Because there is not "never" option, user often try to put there something big enough like 1000, but in this case DB fails by error like this:

PDOException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'field_datetime_value' at row 653: INSERT INTO {field_data_field_datetime} (entity_type, entity_id, revision_id, bundle, delta, language, field_datetime_value, field_datetime_rrule) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7), (:db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14, :db_insert_placeholder_15), (:db_insert_placeholder_16, :db_insert_placeholder_17,
...

Could you add some suitable validation rule? Something big enough, but something that works.

Files: 
CommentFileSizeAuthor
#2 date_repeat_form.inc_.patch1.59 KBglnielsen

Comments

It would be nice for the site administrator to be able to limit the number of repeat occurrences which can be entered and restrict how far into the future the repeat end date is.

This can be a major performance issue, possibly bringing a drupal site down, if someone with permission to create calendar events set either of these values to large.

StatusFileSize
new1.59 KB

Here is a patch with hardcoded limits of max 50 occurrences or repeat date no later than 3 years from today.

This should help prevent any scaling problems from misuse of Stop Repeating.

It would be nice if someone could make those two values configurable in the admin interface.

...or instead of hardcoding a specific limit we could only create the first few occurrences and let the rest be created over time during successive cron runs.

I mean, 50 (or 100 to be safe) repeats makes sense for annual things like birthdays, but what about monthly or weekly or even daily repeats?

I totally agree. I just needed something that would work now to keep contributors from creating a recurring event that brings the server down.

Provided the patch so others could do the same until some more elegant solution is developed.

Title:Stop repeating field cant handle big valuesPossible performance/security issue with repeating field if a large amount of values is defined.
Version:7.x-2.6» 7.x-2.x-dev

This could be classified as a feature request titled: "Create only a minimum amount (TBD) of repeats and set the rest to be created on successive cron runs"

Title:Possible performance/security issue with repeating field if a large amount of values is defined.Create only a minimum amount (TBD) of repeats and set the rest to be created on successive cron runs
Category:bug» feature

klonos: True, it sounds much better fot the feature.

For now we need to have some quick provisional fix: #2051033: Possible performance/security issue with repeating field if a large amount of values is defined.

Issue summary:View changes

guess [#2051033]trying to answer the same problem. One thing missing #2051033: Possible performance/security issue with repeating field if a large amount of values is defined. is the cron job to run/add further repeats. Again, I'm not very sure about how this implementation works for all scenarios(i.e. few sites might be running without cron). But we can update #2051033: Possible performance/security issue with repeating field if a large amount of values is defined. with cron change and close this issue as duplicate.