-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
running greenscript in a cluster on heroku #30
Comments
I see the problem. The keys are generated randomly with either java.io.File.createTempFile (for file cache) or UUID.randomUUID (for in-memory cache). Will see how to address this issue. Basically I need an algorithm to generate a unique key based on a list of path/file names. At the moment the key is generated randomly as stated above, if there is an algorithm which could generate the same key for the same list of file names/paths, then the problem could be solved. |
Hi Mr Green, Have you been able to give this any more thought? Could you generate a hash from the paths that greenscript is loading or something similar? |
Hi generate hash not secure coz there might be hash collisions (which is In your case if you are sure that your path series will not have any hash On Tue, Jan 17, 2012 at 5:37 PM, scottbert <
|
Hi Green, I've had a look to see if I can resolve this but struggled to understand exactly what needs to change. Can you provide some pointers? |
Here is a rough idea
On Fri, Jan 27, 2012 at 11:22 AM, tazmaniax <
|
And the uuid generation would have to be predictable because a cache On 27 Jan 2012, at 00:30, Green Luo
|
If possible u could allow developer to persist the path list and uuid into On Fri, Jan 27, 2012 at 11:35 AM, tazmaniax <
|
Is there some way that greenscript can hook into the Play precompiler so that the css & js get generated at precompile time? that would solve this problem on Heroku. |
Can you check the current version on master? That has integrated a On Tue, Jan 31, 2012 at 10:45 AM, James Ward <
|
I just tested this in Heroku and this is working great! Thanks again for the help! |
After trying this more, it's still happening. However, it happens less often. What do you need from me to reproduce this? |
The solution is use the same UUID for the same list of js file names. On Wed, Mar 7, 2012 at 6:22 AM, Martin Gontovnikas <
|
We're having this problem with the CSS, it's the same as with the JS, right? I'll try to figure this out on Heroku. Thanks On Tue, Mar 6, 2012 at 4:37 PM, Green Luo
|
Yes, css is the same as with js. On Wed, Mar 7, 2012 at 6:58 AM, Martin Gontovnikas <
|
When greenscript runs in a cluster, the minified css/js often fail to load, giving 404s.
Could Greenscript be creating two different CSS/JS keys, one for each node of the cluster, then trying to serve one from the other, mistakenly, or something similar?
Single instance:
JS url:
/public/gs/2453b7a5-2095-4d3c-979f-4cfb1963f15a.js
CSS urls:
/public/gs/02344583-8dce-4cde-95ad-88b4fb9156cd.css
/public/gs/d679a5e3-3631-4ec1-af5d-de7c32c8f061.css
Clustered instance:
JS url:
/public/gs/2453b7a5-2095-4d3c-979f-4cfb1963f15a.js on server 1
/public/gs/763d23cb-af76-424f-ba0b-83da64cfc302.js on server 2
CSS urls:
/public/gs/02344583-8dce-4cde-95ad-88b4fb9156cd.css on server 1
/public/gs/d679a5e3-3631-4ec1-af5d-de7c32c8f061.css on server 1
/public/gs/85f67f15-ae1b-4900-9f10-634a76707b96.css on server 2
/public/gs/22b8e334-8f5a-458b-bb16-60020fed3a82.css on server 2
Am I doing something wrong? Is there anything that needs to be set in the conf file?
This seems like a very similar issue to Issue #28, I'm wondering if he was running in a cluster and failed to mention it?
Regards,
Scott
The text was updated successfully, but these errors were encountered: