June 19, 2013

Post: Apache PHP MySQL and Runaway Scripts

… or due to very complex query you can get your PHP script running too long, well after user stopped waiting for the… for as long time as I wished and even if script did not output anything the 120 “Timeout” set on Apache size did… running (otherwise query may well continue to run even if PHP script is aborted). UPDATE: There are some comments saying experimenting with…

Comment: Pitfalls of converting to InnoDB

… rollback – but instead it remains locked. Another PHP script attempting to insert takes 50 seconds to time-out with a “1205 – Lock wait… in place – it just fails miserably when PHP dies unexpectantly. Having to restarting apache is a pretty drastic measure to overcome a… 50 seconds to time-out – I’m assuming that’s standard (I haven’t tuned anything). So your script could loop for…

Post: Content delivery system design mistakes

…Server This one is pretty interesting. Many learned apache is not good for serving static content …option Serving images you rarely need last access time tracked for them, especially as this tracking …tries to buffer all content it gets from PHP script which means many megabytes for large files. …

Comment: Why do you need many apache children ?

… server only serving php scripts is CPU not RAM. Modern best dual CPUs can handle at most 200 concurrent apache child processes, so Naver prepare to add new php dedicated web server when concurrent apache connection reaches to 100 at peak time. Their daily page views handled by single php web…

Post: mk-query-digest, query comments and the query cache

…-for-php collects information about the PHP process such as wall time, cpu time, mysql query times, etc, and automatically places this information into the Apache… test script to demonstrate the difference. The test loops twice over a set of query patterns. Each pattern is executed 1000 times

Post: Cache Performance Comparison

…MySQL Query Cache and File Cache. Jay uses Apache Benchmark to compare full full stack, cached …to MySQL parsing may be performance bottleneck, assuming PHP opcode cache is not used. Also different … script data in associative array. If you have some data read from database which you need several time

Comment: Debugging sleeping connections with MySQL

… this occurring due to every apache connection opening a mysql connection (as is common in a PHP driven website). If there is a bottleneck, a vicious cycle occurs: 1. apache requests increase 2. mysql…. mysql & apache reach max_connections 9. server slows to a crawl Solution: – Reduce the time a mysql connection is open during script execution…

Post: Should MySQL and Web Server share the same box ?

… servers you may decide ether to grow system in MySQL+Apache pairs or split MySQL And Web Server and place them… – placing some data crunching scripts on database server is often better use of their free CPU time. Second thing you may feel… memory cheap but unless you’re running 500 Apache children with mod_P (php,perl,python) per box (which is probably bad…

Comment: InnoDB vs MyISAM vs Falcon benchmarks - part 1

…really difficult to write good test scripts which can simulate CPU overloading vs….WOW!!! Is it multithreaded version of PHP, or pre-fork ;) The most … (!!!) response time. Yes, 3 seconds is a standard “acceptable” response time for … per decision made. For instance, single Apache HTTPD v.2 Worker can …