Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Shared memory isn't working with node-osrm #50

Closed
clintharris opened this issue Mar 12, 2014 · 2 comments
Closed

Shared memory isn't working with node-osrm #50

clintharris opened this issue Mar 12, 2014 · 2 comments

Comments

@clintharris
Copy link

I'm using OSRM-develop (ce784e0491) and doing this to load the shared memory:

$ osrm-datastore /absolute/path/to/data.osrm

I can see the shared memory with ipcs -m. osrm-routed is able to access this shared memory.

Then I'm using node-osrm like this, where data.ini contains same absolute paths to data:

var opts = new osrm.Options("./data.ini", true /*used shared memory*/);
var engine = new osrm.Engine(opts);

node-osrm works, but it's not using the shared memory. I can manually free the shared memory segment with ipcrm -m {shmid} and my node app still does routing, for example.

Any ideas? Is it because I'm not using the latest version of OSRM, perhaps?

@springmeyer
Copy link

Nice catch @clintharris - looks like the option is parsed properly but then overwritten by GenerateServerProgramOptions. So, you need to set sharedmemory=true in your .ini for this option to stick. Overall fix is #29.

@clintharris
Copy link
Author

Awesome--thanks @springmeyer!

sharedmemwin-5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants