Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

health check / status url

  • caseylucas
  • caseylucas's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 8 months ago #171499 by caseylucas
health check / status url was created by caseylucas
I have LimeSurvey running and would like to periodically (every few seconds or minutes) verify that it is still available. Typically I would configure a health check url or status url (ex: /status) that would respond with https status 200 if the basic application was available and the DB was reachable.

I searched but could not find similar functionality in LimeSurvey. Is this something that currently exists or if not is there any recommendation on the best way to add it?

In my specific scenario, I have LS running in FPM behind nginx.


Thanks,
Casey
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #171506 by DenisChenu
Replied by DenisChenu on topic health check / status url
Home page is a good url no ?

If DB is not available send a 500

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • caseylucas
  • caseylucas's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 8 months ago #171509 by caseylucas
Replied by caseylucas on topic health check / status url
Denis, thanks for the reply. I was hoping not to use the home page because:

1. a new php session is created
2. there are around 10 DB queries when the home page is hit

In the grand scheme of things these are not a big problem. I was just looking for something really basic (especially on resource consumption) so that it could be hit very frequently.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #171513 by DenisChenu
Replied by DenisChenu on topic health check / status url

caseylucas wrote: 1. a new php session is created

Right, i'm unsure it's needed, but since session is automatically started, i don't think you can do a lot without a little session

caseylucas wrote: 2. there are around 10 DB queries when the home page is hit

You must create your own controller, but i think you don't have a clean solution to have only one DB connexion.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose