[Tickets #12656] Horde pings SQL server with each database query

noreply at bugs.horde.org noreply at bugs.horde.org
Wed Sep 4 07:17:28 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12656
------------------------------------------------------------------------------
  Ticket             | 12656
  Created By         | arjen+horde at de-korte.org
  Summary            | Horde pings SQL server with each database query
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Enhancement
  State              | New
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


arjen+horde at de-korte.org (2013-09-04 07:17) wrote:

While monitoring my MySQL server stats, I noticed that half of the  
queries performed are 'SELECT 1' (ping) requests. While it may be a  
good idea to ping the SQL server if we haven't heard from it for a  
while, sending 150 pings in quick succession every  
$conf[activesync][ping][waitinterval] for each ActiveSync connection  
is may be a overkill.

Not that I'm worried about the SQL server load (the load for a 'SELECT  
1' is probably negliable compared to the 'real' queries doing the  
actual work), but sending a ping for each SQL query effectively  
doubles the round trip delay to the server. While this may not be much  
of an issue if the webserver and database are on the same (physical)  
machine, it may add up if they are not.

Idealy, a timestamp should be stored with the connection so that a  
ping is only sent if the last time we heard from the server on this  
connection was more than 'X' seconds ago (with X probably a hardcoded  
value of maybe 10 to 30 seconds). I can see if I can come up with a  
patch to do this, but my PHP skills are mediocre at best, so please  
bear with me.





More information about the bugs mailing list