Posted: 23 Jun 2009, 16:37
Thanks, that could be it. How would you recommend doing that in an extension, since it's all event-driven? Start a separate thread in init() and just do queries from a timer in that thread?Lapo wrote:Ok I see. In this case it is possible that the connection between SFS and the DB becomes stale.But it seems that if no queries are done for about an hour or so, the next query will take at least a few minutes, which is totally unacceptable
In order to avoid this you can simply keep it alive from time to time by simply sending a call to the database, maybe using an inexpensive query like "SELECT 1". It can be done like once every 20 - 30 minutes.
Cheers
Also, since DbManager uses a connection pool, will this prevent other connections in the pool from going stale as well?