when I want to generate report in bubbletimer, it is processing for a while and pop up an error message as below:

Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\drupal\includes\common.inc on line 613

Please help me resolve it, thank you!

Comments

itarato’s picture

Hi,

How many nodes you keep in Bubbletimer? How long is the time range you generate the report?
You can give a bit bigger time execution limit for PHP: search for your php.ini file, and modify this line:
max_execution_time = 30 ; Maximum execution time of each script, in seconds
... to:
max_execution_time = 60 ; Maximum execution time of each script, in seconds
And then restart Apache.
If it's still not enough, please let me know and we can investigate it.

Regards,
Peter

sammys’s picture

I've had the same thing happen. Setting the execution time to 60 seconds still exhausted the time interval. Setting it to 120 exhausted the memory limit with the following message:
Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 84934634 bytes) in /var/www/sites/example.com/modules/bubbletimer/bubbletimer.statistics.inc on line 318

I'm reporting over a month, 15 minute intervals and there are 6 nodes attached to the user I'm reporting on.

sammys’s picture

Title: report generation issue » Report generation runs out of memory/time
Category: support » bug
Status: Active » Needs review
StatusFileSize
new1.11 KB

The bug surfaced because on that date my timezone went from Summer time to Winter time (loss of daylight savings). The problem occurs because the for loop uses $timestamp not only in the conditions/increment but also the key of $result (after it has been converted to a string). This is BAD! :)

Patch attached.

However, there's still a problem with the date showing twice in the CSV. That's the subject of another issue report.

sammys’s picture

Title: Report generation runs out of memory/time » Report generation runs out of memory/time and has daylight saving problem
StatusFileSize
new2.1 KB

The date showing twice is caused by the loop using += BT_DAY to increment $timestamp. For this reason the fix for this must remain here in this issue node.

Using the fixed number of seconds in a day fails to increment correctly because on 'daylight savings shift' days there are either 23 hours in a day or 25 hours in a day. As a result you must always use strtotime('+1day', $timestamp) to increment the timestamp.

Attached is a patch containing this and the previous fix for both oneuser and onenode reports.

sammys’s picture

StatusFileSize
new1.82 KB

Here is a patch for anyone wishing to fix the current release (1.5).