Hi Randy,
Actually it’s quite a big misconception that PHP’s sleep() is a resource hog, it actually tells the kernel of all modern OS’s to give the process a lower priority and ignore it for a bit - kind of the same way that cron works. As a deadline nears its priority gets higher and the time span between being ignored decreases.
pepsi@planb:~$ time php
<?php
echo time()."\n";
sleep (30);
echo time()."\n";
?>
1344217588
1344217618
real 0m31.040s
user 0m0.100s
sys 0m0.078s
The only reason the real time is over the 30 seconds is because it took me 1.04s to paste the quick program and hit ^D to parse/execute it. The actual combined time spent in the kernel and userspace was 0.178 seconds, and I dare say the bulk of that was spent parsing my pasted program rather than doing nothing when it was running.
With regards to your infolog, 500MiB of data isn’t a great deal but I’ve seen a few instances where the “SQL ninja” inside of me can write a more efficient query to do something but I’ve thought that perhaps portability in certain areas are better than custom SQL that takes full advantage of the feature set and foibles of a single RDBMS and doesn’t work at all in anything else. I think this is the trade-off when writing portable SQL. Maybe your best bet is to activate a slow-query log, EXPLAIN what takes time and seeing where you can optimise the database rather than the SQL. I know you can get automatic database tuning systems but in our experience these cause merry hell with eGW when they start making sweeping changes. 20 seconds does horrify me quite a bit though, even a tenth of that would be of grave concern.
With regards to your issue proper, I am understanding more that it’s definitely related to a specific installation-identifier and not affecting other installation. Because of this I highly doubt your delay is coming from Apache, since it would similarly stop serving pages for all the other VirtualHost’s on the machine. It seems far more likely it’s coming from the database, perhaps from a locked table or even you’re maxing out the maximum connections or some other database parameter.
I note that if you send a SIGSTOP to all MySQL processes that your header file is set to connect to or create some other kind of blocking action; Apache will sit there for a while before timing out (or depending on your configuration, it may sit there indefinitely). You may not get any error message if it takes too long and the browser times out. This would affect only a particular eGW installation (assuming that all 4 connect to different databases). The hack you suggested just seems kind of the wrong way to go about it and I’m not convinced it will work if it is DB related.
Without some more investigating I don’t know what to suggest, I don’t know much about async since we don’t use it much. Somebody else may have some ideas but it’s all a bit pie-in-the-sky without looking in log files, gathering some metrics and running reproducible test cases. As I said in my last post about virtualisation, this might be the perfect time to give it a go. Clone your server and then you can test it, dismantle it and rip out its inner workings to discover the issue - but all in the safety of a self-contained sandbox where it can’t do any damage and you can simply throw it away afterwards.
The data I mentioned is about 2.5TiB of MySQL data containing a lot of pERP information and the rest is supporting file assets for that data. An example of where direct database import systems had to be written to extract and import the relevant data, but they still take several hours to run a full batch. But I tell you it was easier to get it in to pERP than it would be to get it in to anything SAP. Nathan has done a good job with the schema.
I think you should wait for the problem to occur and simultaneously look at the Apache scoreboard and the MySQL processlist to get a signpost to the relevant direction. Good luck,
WLD
Our custom app relies heavily on infolog only 500MG of data but can take upto 20 seconds per query. On the other hand we have 25Gigs in filemanager/files. No major issues there except for loading infolog in fileselect.
I have one hog of a funciton that faxs and as matter of poor design while waiting for the confirmation we use php sleep which just spins the servers wheels waiting for a response. However other users as not effected by that bottleneck only the user who started that session has to wait for it’s completion before apache responds to another request from that user.
The async functions seem to not allow any other users access to that instance. It seems almost like an apache configuration would need to be changed but at this point I was looking for a cheat as opposed to researching :-P.
What sort of data are you store to get to 7-8 TiB ? out of curiosity?
I am thinking maybee a hack to start up with a new install ID assuming async is started by cron and not a user session. i have not got into the code yet to know if that would work.
Thanks,
Randy
Live Security Virtual Conference
Exclusive live event will cover all the ways today’s security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers