Closed (fixed)
Project:
Date
Version:
6.x-2.x-dev
Component:
Date Repeat API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2008 at 12:35 UTC
Updated:
8 Dec 2008 at 15:01 UTC
Hi, everything is working fine expect the repeat api. When I try to save the event the following message appears in the screen after some seconds:
Fatal error: Maximum execution time of 30 seconds exceeded in [mySitePath]/modules/date/date_repeat/date_repeat_calc.inc on line 366.
I'm trying to save one event that repeats every friday.
Comments
Comment #1
patrickmedina commentedHelp please
Comment #2
karens commentedI can't replicate any problem in the latest code so I need you to try the very latest -dev code to see if you're still having trouble. If so I need more info about exactly what kind of date you are using and how you set your form up when you had the trouble -- what start date did you use and what options were selected in all the date repeat selection boxes. I also need to know what version of PHP you're using and what other modules you have installed in case you have something else installed that could be creating the problems.
If you use the tarball, wait until tomorrow to try this because I've committed changes today that affect repeating dates and they won't make it into the tarball until tonight. Then you'll also need to run update.php.
I don't think any of these changes affect your problem because I could do this fine before, too, but we always have to test problems against the latest code.
And the 'Assigned' box is the person who plans to fix the problem, so that's probably not you :)
Comment #3
cpelham commentedI'm having the same problem. I'm using CCK RC8 and Date RC3 in Drupal 6.4.
Oddly enough it's happening with a node that is a translation of an English-language node which has the same info and went through fine. My exact error message is:
Fatal error: Maximum execution time of 30 seconds exceeded in /home/chrispel/public_html/crsny.net/drupal/sites/all/modules/date/date_repeat/date_repeat_calc.inc on line 269
Interestingly, whenever I re-edit it, the dates (as opposed to time) in the from and to boxes revert to English language: October 8, 2008
and if I click save (without putting the Repeat dates back in), I will get an error message saying:
event_date_cck From date is invalid.
event_date_cck To date is invalid.
If I re-select those dates from the jscript calendar they return to Japanese language and don't throw an error.
The repeat I'm trying to put in is repeats every week. Even If I just have it repeat for two weeks, I get the time our error.
Comment #4
cpelham commentedI just installed the current Date dev version and tried again, and I got another timeout error:
Fatal error: Maximum execution time of 30 seconds exceeded in /home/chrispel/public_html/crsny.net/drupal/sites/all/modules/date/date_repeat/date_repeat_calc.inc on line 295
My host is using PHP 5.2.5
Comment #5
kalle commentedHi!
I get the same error using PHP 5.2.6 and date 5.x-2.3 using Javascript pop-up.
1) Try to save a date-event with repeat every week(s).
2) Error message after timeout: Fatal error: Maximum execution time of 20 seconds exceeded in /home/u/u1994335/www/modules/date/date_repeat/date_repeat_calc.inc on line 280
/Carl
Comment #6
cpelham commentedI stopped getting the error...
Comment #7
ehr commentedWith drupal 6.5, php 5.2.6 and both newest date and calendar modul dev from 2008-10-11and all german language translations I still can't set a repeat evvery week. Allways the max execution error in date_api or date_repeat_calc.
Comment #8
aquanox24 commentedHio Karen,
same error here:
Try to add a node with repeating every third thuesday (every month).
Timeout after 30s.
PHP 5.26, Drupal 5.11
Date Modul: dev 5.2x, date 2008-Oct-10
Repeat every week works.
Thank you
Comment #9
cpelham commentedSome times I have better luck if I use the advanced settings to set the repeat instead. The advance settings repeat does not require an end date, not sure if that might be related or not. Does it set/store the repeat differently?
Comment #10
aquanox24 commentedHi KarenS,
Comment#8
by the Way, in my case i get only a blank page (after 30s), so i can't say the detailed error.
I can't edit the php-config from my hosted package. Is there any other way to get more debug-information?
What is the current State of this Issue?
Thank you very much.
aquanox24
Comment #11
aquanox24 commentedHi KarenS,
i work more on the Problem and switch debugging on:
add
ini_set('display_errors', 1);
ini_set('max_execution_time', '90');
in date_repeat_api.inc
get the timeout-error:
Fatal error: Maximum execution time of 90 seconds exceeded in /htdocs/test/sites/all/modules/date/date_api.module on line 1118
but i get the error on different lines every time i test.
Fatal error: Maximum execution time of 90 seconds exceeded in /htdocs/test/includes/common.inc on line 738
//$Id: CHANGELOG.txt,v 1.1.6.183 2008/10/23 11:11:14 karens Exp $
// $Id: date_repeat_calc.inc,v 1.4.2.8 2008/10/04 11:49:49 karens Exp $
please tell me, how i can help to solve the problem.
Thank you
Comment #12
spython commentedSame here - every day repeats work, but every week or month gives a time-out. If I select "week starts with monday" in the site's date and time settings, it doesn't time out but shows only the first event of the series.
Tried it with a fresh install, and there it works perfectly out of the box, regardless what is the first day of the week.
My work site, where it doesn't work is also a relatively fresh install, just a week old, but with more modules and views.
Any help would be greatly appreciated.
Comment #13
karens commented#9 - the advanced settings are supposed to require an end date, so that's odd. Can you give me an example of exactly how you're selecting your options so I can try to replicate this?
#12 - see, even you can't replicate this with a fresh install, which jibes with my inability to replicate the problem.
Erratic errors are the very hardest things to debug, and since I can't yet replicate the problem, I can't do anything about it. If anyone can come up with a step by step way to replicate the problem on a fresh install, I might be able to do something. If you can't create the problem on a fresh install, something else is going on here.
Comment #14
karens commentedI found some problems in the date repeat code that could be a factor here when I fixed #319452: Dates are missing for repeated dates. That change was committed to both the D5 and D6 versions and is in cvs now and will be in the -dev tarball tomorrow. Please test to see if that eliminates the problems.
If you still have trouble after that, please provide exact details about how to create the problem -- what first day of the week are you using? What is your site and user timezone? What kind of date field and widget are you using? Exactly which options did you select for the date and in the repeat options, making sure I know things you left unchecked as well as things you checked.
Comment #15
karens commentedUpdate, I finally have been able to come up with a way to replicate the problem, so I have a place I can do some testing. My recent fixes apparently weren't enough, since I still get a timeout, but since I'm seeing it myself I can debug it. I'll see if I can figure out what's going on...
Comment #16
karens commentedI committed some more fixes to the date repeat logic that seem to get rid of the timeout problems. The computation takes longer in PHP4 than in PHP5.2 because we're using the more cumbersome wrapper functions, but it is no longer timing out even in PHP4 for me with the latest changes.
Comment #17
aquanox24 commentedHi Karen,
Thank you very much, no more Timeouts so far.
But now i get wrong Repeats.
I try to Repeat every third Wednesday in a Month.
But the only Repeating-Day under "Repeats"-Tab is 19.08.2009.
Drupal: 5.11, PHP 5.26, SQL 5.0.41
Dev-Version: Last updated: November 4, 2008 - 02:04
First Day of Week = Monday
Timezone: Europe/Berlin
User-Timezones: No
Date Field Type: Date
Widget: Text Field with jquery pop-up calendar
Time-Zone-Handling: Site's Timezone
From-Date: 19.11.2008 19:30
To-Date: 19.11.2008 22:00
Repeat:
Every Month
Until: 18.11.2009
Month: Any
Day of Month: Any
Day of Week: Every Third Wednesday
Result:
19.11.2008 19:30 - 22:00
Repeats the third Mittwoch every month until Mit Nov 18 2009
Result in Calendar and Repeats-Tab:
19.11.2008 19:30 - 22:00
Repeats the third Mittwoch every month until Mit Nov 18 2009
19.08.2009 19:30 - 22:00
I think this is a new Bug, right?
Comment #18
karens commentedYou may not have all my commits yet, I just finished committing them so I can't tell, but unless you picked up the code directly from cvs (not the tarball) in the last hour or so, you probably don't have everything.
I'll try to replicate your issue just in case, but I suspect you don't have the latest commits.
Comment #19
aquanox24 commentedHi Karen,
I got the latest Files from here:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/date/date/?...
I grab this Files:
/modules/date/date/
date_repeat.inc 1.9.2.18 17 hours karens #296529 Update repeating date computations to properly adjust the UNTIL date to ...
date_content_generate.inc 1.1.4.7 17 hours karens #296529 Update repeating date computations to properly adjust the UNTIL date to ...
date.module 1.39.2.44 20 hours karens #326732 Fix local task to create Date repeats tab, check for valid node and add ...
modules/date/date_repeat/
date_repeat.module 1.23.2.6 17 hours karens #296529 Update repeating date computations to properly adjust the UNTIL date to ...
date_repeat_calc.inc 1.4.2.12 17 hours karens #296529 Update repeating date computations to properly adjust the UNTIL date to ...
Same Problem as #17
Greetings from Germany.
Comment #20
arnaud.ranson commentedfor what i saw in my site, there could be a problem of permission
when i use my first user (admin) everything's ok
when i use another user with the right to add, edit and edit own content , i've got the same problem
i can't figure out what's the permission needed (by test or by reading the module code)
Comment #21
shumod commentedHi, KarenS.
Date repeat works perfect in english.
When I import my ru.po file and enable russian - "Fatal error: Maximum execution time of 100 seconds exceeded in ....includes\common.inc on line 783"
Every day, month, year repeat work, week - gives a timeout.
drupal - 6.6
date - 6.x-2.x-dev(Nov-04)
cck - 6.x-2.0
Sorry for my english. )
Comment #22
patrickmedina commentedUmh... I had my drupal in Portuguese. In fact, in english the error does't appear. Anyway, no repeating events :(
Comment #23
arnaud.ranson commentedI'm pretty sure it comes from locale
my site is in french and english :
- english : everything is ok
- french : timeout appears
Comment #24
aquanox24 commentedHi Karen,
i can confirm the locale-Problem.
if i switch to english, i get correct repeatings in the repeating-tab:
21.11.2008 22:00 - 23:50
Repeats the third Friday every month until Thu Nov 19 2009
19.12.2008 22:00 - 23:50
16.01.2009 22:00 - 23:50
20.02.2009 22:00 - 23:50
20.03.2009 22:00 - 23:50
17.04.2009 22:00 - 23:50
15.05.2009 22:00 - 23:50
19.06.2009 22:00 - 23:50
17.07.2009 22:00 - 23:50
21.08.2009 22:00 - 23:50
18.09.2009 22:00 - 23:50
16.10.2009 22:00 - 23:50
unassigned "shumod", because i think hi would'nt solve the issue ;-)
Comment #25
karens commentedLet's change the title to reflect the apparent problem. If anyone is able to try to debug this, I'd appreciate help, otherwise I'll get back to this after I fix some other problems.
Comment #26
karens commentedI set up locale in the latest code and switched languages and tried a repeating week event and had no problems at all. But the message in #21 indicates the error is coming while locale is doing a translation, so their is clearly a link between this problem and locale. If I could figure out what it's trying to translate when that happens we'd have our problem solved.
There really shouldn't be any translation going on during the repeat calc process, so if something is, that's a bug.
Comment #27
karens commentedFound out where this was coming from, there were some functions that were calling other functions that were using t() that needed an adjustment to stop running values through t() during repeat calculations. It was trying to translate the day of week names, so the timeouts we connected with calculations that used the day of the week name in some way (like 'Every Friday').
The fix is committed to cvs in both D5 and D6 and I'll be rolling new releases for both of them, hopefully today, and the fixes will be there.
Comment #28
LuCkpt commentedi'm having this error:
Fatal error: Maximum execution time of 60 seconds exceeded in /home/ondajove/sesimbra.pt/momentos/modules/date/date_api.module on line 1028
when i use dates with years like 950, 1500, if i use 1990 or more its ok, whats the problem ? :^|
Comment #29
LuCkpt commentedi changed my date field from datestamp to datetime and the problem as solve, but when i use dates before 1000 i get an error.
ex:
11/10/956- 11/02/967
* teste From is invalid.
* teste To is invalid.
pls help
Comment #30
karens commentedDates before 1000 are not supported if you use a PHP version earlier than PHP 5.2. Why would you be doing repeating dates for dates that old?
I have no idea how far back you could safely go and have repeating computations working correctly. Probably not older than 1900. The computations do things like timezone conversions that will be completely meaningless for such old dates, if they don't completely fail. And it will certainly timeout trying to figure all the repeating code out for extremely old dates in older versions of PHP that use the PHP4 wrapper code, especially for things like 'every fourth Tuesday in the year 1000'.
Repeating date computations are really really complex on more current dates, I'm not surprised they timeout on ancient historical dates. That just isn't going to work.
Comment #31
webwriter commentedJust installed last night's dev on a 6.6 core and get the same error.
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/sites/all/modules/date/date_repeat/date_repeat_calc.inc on line 314
Comment #32
webwriter commentedEdited to add- event trying to add for Nov Dec of this year.
Tried another for Nov2008 -Jan2009 and got a different error
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/includes/common.inc on line 767
Comment #33
karens commentedI just committed fixes today, as noted in #27. Obviously last night's -dev does not have the fixes.
Comment #34
aquanox24 commentedYes, yes, yes.
My first Tests are positive. Thank you very very much for your good work!! Now one of my big problems is solved!
So, now i will translate the enduser-interfaces to german.
I get some Problems. i will open a new topic.
THANK YOU!
auquanox24
Comment #35
patrickmedina commentedOh yes!!!
The error is gone!
Thank you.