Would it be possible to make the shm_size param an option in app.yml? I ran into this error today when trying to do a vacuum analyze:
ERROR: could not resize shared memory segment
It was trying to increase the shm usage to 1 GB and failed, as it’s only 512 MB out of the box. This param looks to be in the launcher script, but it might be nice to have this as an option (possibly commented out by default) in the .yml file.
This didn’t work when I tried it unfortunately. I think maybe the container needs to be rebuild to increase the size of the shared memory space? I had to change the value in the hard-coded areas in the launcher script and then rebuild the container for it to actually take effect.
This likely wouldn’t persist across updates/rebuilds either - you’d need to be manually changing it every time.
All I did at first was stop the container, then run the launcher start command with that parameter. Then I manually edited the --shm-size params inside the launcher script itself and rebuilt the container. Then it adjusted the value correctly. If you override the param on the command line to rebuild the container, then won’t the change be lost if you perform an update/rebuild through the /admin/upgrade interface? That’s why I thought it might be best to make it a field in app.yml - then it would persist through rebuilds and code updates.
Caveat: Some people have posted that you must make sure that docker service is stopped before you modify hostconfig.json (or the changes will be overwritten). However, I have not actually tested this. Obviously a launcher solution is better