Skip to content
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

Postgis Connection lost #304

Open
kesslerf opened this issue Jul 28, 2022 · 4 comments
Open

Postgis Connection lost #304

kesslerf opened this issue Jul 28, 2022 · 4 comments

Comments

@kesslerf
Copy link

Hey,
Our Mapserver seems to lose the connection to the used DB (both are stored in docker containers) after some (varying) time.
I tried to play with the environment variables, as I thought it might have to do with idle connections that get terminated.

      BUSY_TIMEOUT: 10
      IDLE_TIMEOUT: 10
      IO_TIMEOUT: 10

This however didnt lead to closed connections after 10 seconds which I assumed are the unit for this values. Is there like a minimum threshold or can I set all of them to 0 to never terminate the connections automatically?

@kesslerf
Copy link
Author

Ok I should probably add that I am using a docker-compose file:
mapserver:
image: camptocamp/mapserver:7.6-20-04
ports:
- "8080:80"
secrets:
- mapserver-key
configs:
- source: mapfile
target: /etc/mapserver/mapserver.map
environment:
BUSY_TIMEOUT: 10
IDLE_TIMEOUT: 10
IO_TIMEOUT: 10
MS_DEBUGLEVEL: 5

@sbrunner
Copy link
Member

sbrunner commented Aug 8, 2022

Those values are used by Apache to integrate MapServer, to not close the database connections you should add in your layer in the MapFile: PROCESSING "CLOSE_CONNECTION=DEFER"

@kesslerf
Copy link
Author

kesslerf commented Aug 8, 2022

Thank you for the Answer. I will try it and report if it helped.

@kesslerf
Copy link
Author

Unfortunately this didnt work. I still get a connection timeout.

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

No branches or pull requests

2 participants