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
Race condition with external resources #82
Comments
Hi @strk I don't think that's the problem. |
I tried locally and it looks like applying the same cartocss to a map doesn't really send any request to the tiler from the browser. Instead the browser performs a PUT to the maps API (rails). Indeed I do see a request to the deprecated API arriving to the tiler from the rails API host, so the problem could be there. Can you confirm there's no request to tiler from the browser on later requests ? |
I confirm there's no request from browser. Tried online. The call to deprecated API is really triggered by the PUT to maps api. |
So we have two options here:
|
I'm seeing more weird things here. Specifically I'm seeing multilayer map styles in redis that reference resources downloaded to per-table cache dirs. This may very well be the cause of our troubles. It could be that while copying the style from a so-called "table" we end up getting the localized path rather than the original path, which is then unguaranteed as per lifetime. \cc @lorenzoplanas @javisantana |
So it looks to me that millstone is really not meant to be used the way we are, that is with different configurations within the same process. Look here: That global has is used to keep track of "in progress" downloads. Now I suspect that this means accepting the local path for the first request and discarding the one specified in the second. I filed a ticket to that extent: tilemill-project/millstone#105 |
I don't see any easy way to force millstone to use local variables for those caches. This means we either fork millstone to avoid the cache or we change our approach to use a single sandbox with all localized resources together. If we take the "single sandbox" approach we'll have a problem deciding when it is safe to cleanup elements in the cache. |
I've sent a pull request for millstone, but it would be helpful if anyone could confirm the pull fixes the bug (I can't handle to reproduce myself): tilemill-project/millstone#107 |
Testing this involves installing millstone from our fork: https://github.com/CartoDB/millstone/tree/master-sandboxes |
Pull request was merged, so it's a matter of testing against millstone master now |
will try it asap |
tested, finally ? |
I've added a test within grainstore: CartoDB/grainstore#52 |
Reopening, as there might be a problem with the new millstone version: |
never mind, it was a time-related issue.will raise the timeouts |
Sometimes the localized external resources needed by CartoCSS are removed from disk before their corresponding style expires.
This seems to be due to the way filesystem path for the resources is determined.
Originally reported here:
https://groups.google.com/forum/#!topic/cartodb/m9t4iFdM-ok/discussion
Jira ref: https://cartodb.atlassian.net/browse/CDB-67
The text was updated successfully, but these errors were encountered: