I have something that I don't quite understand with the library and debugging it - having run xdebug profiling on the CLI gearman task it states that it runs for a total of 5.5 seconds as a result of xdebug's cachegrind file. What I have is a code that contacts external web service, fetches data and retrieves relevant datasets from our database. In total, it safely can process about 300 odd records. I set the timeout on gearman worker to 20 seconds and tries to increase the limit to 400 but alas it is not enough time to process this many records. My conundrum is this - why is xdebug states it only takes 5.5 seconds to run the code that gets 300 records, while gearman times out if it's increased to 400, meaning it takes MORE than 20 seconds to do that? Sometimes it times out on 320, or 310, I just picked 400 as marginal example guaranteed to timeout. Has anyone got any suggestions?
Asked
Active
Viewed 343 times
0
-
Can you show the code where you set the timeout, and your code that handles the GEARMAN_TIMEOUT return code? – Kris Peeling Jun 10 '16 at 14:59
1 Answers
0
Having set up XHPROF we can now clearly see, without the need for xDebug, precise details of what is being called and for how long it is running.

Daniel Protopopov
- 6,778
- 3
- 23
- 39