[horde] Horde ActiveSync - every few seconds disk write of the mysql database

Samuel Wolf samuel at sheepflock.de
Sat Nov 28 13:08:01 UTC 2015


Zitat von Samuel Wolf <samuel at sheepflock.de>:

> Zitat von Michael J Rubinsky <mrubinsk at horde.org>:
>
>> Quoting Samuel Wolf <samuel at sheepflock.de>:
>>
>>> Hi,
>>>
>>> I wondering why my small home Horde server has every few seconds a  
>>> ssd access.
>>> Find out after some debugging with top/iostat/dstat it is a write  
>>> operation of the database.
>>>
>>> Nobody use the Horde Web interface at this time, only Smartphones  
>>> via ActiveSync are connected. As soon I stop the apache, the write  
>>> access stop as well.
>>>
>>> Is there something with ActiveSync which need every few seconds a  
>>> insert/update in the database?
>>
>> There are a number of places where we need to save state to storage  
>> in ActiveSync. The most frequent cause of this would be during the  
>> start of various types of PING and SYNC requests where we save a  
>> timestamp and possibly other data (depending on the type of SYNC  
>> request). This is needed to prevent race conditions since clients  
>> may (and often do) initiate new SYNC/PING requests while a previous  
>> one is still running on the server. The timestamps are checked, and  
>> if a running request detects that there was a change in the various  
>> state/cache data it exits and yields to the new request.
>>
>> If you have configured an artificially short heartbeat interval in  
>> your config, this may contribute to this, but now I'm just  
>> speculating.
>>
>> Depending on how many devices you are supporting every few seconds  
>> may or may not be "normal". You can bump the Horde log up to DEBUG  
>> - where it will log all queries - and see exactly which  
>> INSERT/UPDATE write operation is running every few seconds and we  
>> can go from there.
>
> Debug log was a good idea.
> Good news, Horde only trigger select queries and I see the disk  
> write also with disable ActiveSync (not one active user in the  
> webgui).
>
> This must be a "problem" of my apache, as soon I start it the write  
> starts as well.

Found it with strace and the debian forum:
open("/tmp/HordeCacheTQKuze", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 18
rename("/tmp/HordeCacheTQKuze",  
"/var/cache/horde/cache_182c260a8128cfc03866e1251fada4ea") = -1 EACCES  
(Permission denied)
open("/var/cache/horde/horde_cache_gc", O_WRONLY|O_CREAT|O_APPEND,  
0666) = -1 EACCES (Permission denied)

/var/cache/horde was owned by root with no write permissions for  
apache2 (www-data).
This must happen (and my fault) when I move the system from Debian 7  
to Debian 8.

Samuel

>
> Anyway, thank you for the ideas.
>
> Samuel
>
>>
>>
>> -- 
>> mike
>> The Horde Project
>> http://www.horde.org
>> https://www.facebook.com/hordeproject
>> https://www.twitter.com/hordeproject
>
>
>
> -- 
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org





More information about the horde mailing list