Closed (fixed)
Project:
Subscriptions
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
7 Jun 2007 at 07:02 UTC
Updated:
6 Aug 2007 at 01:16 UTC
Jump to comment: Most recent file
The module worked well for some times, but now when i want to create content the following error appears:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 16777217 bytes) in /home/ewaste/public_html/modules/subscriptions/subscriptions.module on line 709
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | better_storage_of_previously_notified_0.patch | 10.25 KB | chx |
| #4 | better_storage_of_previously_notified.patch | 8.07 KB | chx |
Comments
Comment #1
markdionne commentedI'm getting a similar error with Drupal 5.1, and it goes away if I disable the taxonomy_super_select module. The problem occurs here:
in the "insert" case of the nodeapi hook. $strsent starts out as "!". After the first loop it is "!!" then "!!!!" then "!!!!!!!!" so it doesn't take long to run out of memory!
It looks like in multiple places, this code:
$strsent .= subscriptions_mailvars...should be changed to
$strsent = subscriptions_mailvars...but I have not read the code closely enough to be sure.
There must also be some kind of issue with Taxonomy Super Select.
Note: I changed the Title of this issue from "Fatal Error" to something a bit more descriptive.
Comment #2
markdionne commentedIn the case of taxonomy_super_select, the loop:
is getting a zero value for $tid for each of the unused taxonomy items. This makes the previously described memory failure much more likely to happen, not to mention being inefficient in general. The fix is obvious, though note there are several similar loops in the module.
Comment #3
csc4 commentedDoesn't this issue need moving/copying to the taxonomy super select issue queue?
Comment #4
chx commentedThe problem is that every call to subscriptions_mailvars at least doubles the length of the strsent string. This is braindead. The whole concept of strsent is flawed. The attached patch removes it.
Comment #5
chx commentedThat was a good start but it had bugs and could be simplified further.
Comment #6
chx commentedComment #7
(not verified) commented