View Issue Details

IDProjectCategoryView StatusLast Update
6163Composrphpinfopublic2025-03-08 14:32
Reporterdkpartycomrade Assigned ToPDStig  
PriorityhighSeveritymajor 
Status assignedResolutionopen 
Product Version10.0.50 
Summary6163: Possible memory leak when Force memory conservation is enabled
DescriptionThe "Language" part of the help section says: 

"Your server has a very low PHP memory limit, and the developers cannot guarantee that Composr will be able to function within this limit. Once you have installed, please try renaming the bundled recommended.htaccess file to .htaccess, as this will try and raise the memory limit (if that causes errors, you'll need to rename it back and create a custom php.ini, as described in our FAQ). Composr officially requires a minimum 16MB limit, but 32MB is recommended. If you cannot override or change the limit, consult your webhost; Composr may function to some degree, but problems will occur in numerous areas if more than a little content is added."

Yet there is an elusive setting that supposedly does: Force memory conservation, Enable this if you're using a server that has a low memory limit that cannot be overridden, but where PHP incorrectly (due to a modified PHP version) reports the limit as off ('1 & 1' hosting accounts do this). This will put Proletarian Revolution into a mode where it optimises itself to preserve memory, and instead be a bit slower. (Which I believe would help my situation).

The error I receive is: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home2/xdsyeite/public_html/sources/database/mysqli.php on line 335
Critical error – bailing out
This is an error that has been elevated to critical error status because it occurred during the primary error mechanism reporting system itself (possibly due to it occurring within the standard output framework). It may be masking a secondary error that occurred before this, but was never output - if so, it is likely strongly related to this one, thus fixing this will fix the other.
Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) [sources/database/mysqli.php at 335]

This is only when I am editing/posting articles to the wikipedia. I just tried to edit an article for the blog, and there is no error.

On top of that, the setting for Force memory conservation doesn't seem to be in the settings where it's linked in Advanced settings, I could be wrong. Maybe memory leak? I am not sure.
Steps To ReproduceEditing/posting wikipedia articles
Oddly enough, editing blog posts does not reproduce issue.
Additional InformationPHP: 8.2.27
COMPOSR: Version 10.0.50
TagsNo tags attached.
Attach Tags
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

admin

2025-03-07 06:14

administrator   ~9844

Automated message: This issue was created using the Report Issue Wizard on the Composr homesite.

dkpartycomrade

2025-03-07 20:27

reporter   ~9845

After a while of going back and forth between looking at the files in FTP and the hosting website, I confirmed that the PHP memory was set, at least on the hosting platform's side at 512 MB or around that. Thus, I then added some blocks of code to the website to determine whether PHP memory was set to, and I got 200 MB. I added another parameter to tell me if it would be able to allocate 200, and it was successful. Yet, I still got issues with editing and adding pages to the Wikipedia, drawing into a memory block at around 120 MB. After a while, I ended up looking in my plugins to remove unnecessary items that could of contributed, and I ended up removing the "weather" plugin that uses Yahoo API, and sure enough, I am able to edit items off the wiki now without a memory problem? I'll add another note if there is any update.

dkpartycomrade

2025-03-07 20:29

reporter   ~9846

I spoke too soon, the problem remains persistent on editing wiki page titles:

 Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home2/xdsyeite/public_html/sources/database/mysqli.php on line 335

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home2/xdsyeite/public_html/sources/global2.php on line 846

PDStig

2025-03-07 20:49

administrator   ~9847

Got it. I'll have to look into this later after 11 beta 7 is out and I have a clean working directory.

dkpartycomrade

2025-03-08 04:52

reporter   ~9849

Thanks Patrick. I confirmed a few things to save you some time.

The hosting platform has set a maximum of 500 MB of PHP memory.
PHP local memory that the website is running off of is set at 128 MB, however the global php settings for the hosting are indeed set to the 500 MB.
I confirmed that the website was able to allocate at least 200 MB, and it would seem that composr generally anyways runs off little ram, as stated 32 mb is recommended.

I ended up going to this file into FTP and looking at the code; sources>global2.php>[line 971] $default_memory_limit = '128M';

I changed this to 400 and still there was no fix. I think somewhere along the wikipedia area is another issue outside of the livechat feature (header problem). I have cycled down the issue to be editing certain pre-existing articles, and it also does not display certain other made articles within the admin zone > wiki pages. So I think there is a memory leak somewhere in the wiki portion, but then again I really am not sure.

PDStig

2025-03-08 14:32

administrator   ~9850

To me, it sounds like a memory leak or an infinite loop somewhere.

11 beta7 entered testing stage yesterday so it will only be a few more days before release (hopefully), and then I can switch over to v10 and take a look.

Add Note

View Status
Note
Upload Files
Maximum size: 32,768 KiB

Attach files by dragging & dropping, selecting or pasting them.
You are not logged in You are not logged in. This means you will not get any e-mail notifications. And if you reply, we will not know for sure you are the original poster of the issue.

Issue History

Date Modified Username Field Change
2025-03-07 20:27 dkpartycomrade Note Added: 0009845
2025-03-07 20:29 dkpartycomrade Note Added: 0009846
2025-03-07 20:48 PDStig Summary Critical PHP Error "Bailing out" => Possible memory leak when Force memory conservation is enabled
2025-03-07 20:48 PDStig Description Updated
2025-03-07 20:48 PDStig Steps to Reproduce Updated
2025-03-07 20:48 PDStig Additional Information Updated
2025-03-07 20:49 PDStig Note Added: 0009847
2025-03-07 20:50 PDStig Assigned To => user4172
2025-03-07 20:50 PDStig Status Not Assigned => Assigned
2025-03-08 04:52 dkpartycomrade Note Added: 0009849
2025-03-08 14:32 PDStig Note Added: 0009850