Advertisement

Memory exhausted error when updating site (upgraded from J3)

Need help upgrading your Joomla! website or converting to Joomla! 5.x?

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
bjrn
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Jan 29, 2013 2:32 pm

Memory exhausted error when updating site (upgraded from J3)

Post by bjrn » Wed Nov 27, 2024 1:32 pm

I have a site that's been upgraded from Joomla 3. All third party extensions have been removed and only the extensions installed by Joomla itself remain.

When trying to update from 5.2.1 to 5.2.2. I get an error saying: Error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 20480 bytes)

I'm honestly stumped because I have this very bare-bones site and I can't see what might be wrong. Any suggestions for what I might be missing or could try are welcome.


Edit to add: I've also tried deleting all files and uploading a clean release of Joomla 5.2.1, only deleting the install directory and restoring the configuration.php file. That didn't help.
Additionally, I have another site with the exact same server configuration which had no issues updating.



When setting debug to max, I get the following stack trace

Code: Select all

Symfony\Component\ErrorHandler\Error\OutOfMemoryError:
Error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 20480 bytes)

  at /usr/local/www/vhosts/sitename/htdocs/libraries/src/Log/LogEntry.php:126    

and the exception code shown is

Code: Select all


            if (!empty($category)) {
                $this->category = (string) strtolower(preg_replace('/[^A-Z0-9_\.-]/i', '', $category));
            }
            // Get the current call stack and back trace (without args to save memory).
            $this->callStack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
            // Get the date as a Date object.
            $this->date = new Date($date ?: 'now');
        }
    }
Below the FPA output.
Forum Post Assistant (v1.6.7) : 27-Nov-2024 wrote:
Last PHP Error(s) Reported :: wrote:[27-Nov-2024 14:24:58 Europe/Amsterdam] PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 69632 bytes) in /usr/local/www/vhosts/sitename/htdocs/libraries/src/Log/LogEntry.php on line 126
Basic Environment :: wrote:Joomla! Instance :: Joomla! 5.2.1-Stable (Uthabiti) 7-November-2024
Joomla! Configured :: Yes | Read-Only (444) |
Configuration Options :: Offline: false | SEF: true | SEF Suffix: false | SEF ReWrite: true | .htaccess/web.config: Yes | GZip: false | Cache: false | CacheTime: 15 | CacheHandler: file | CachePlatformPrefix: false | FTP Layer: false | Proxy: false | LiveSite: | Session lifetime: 120 | Session handler: database | Shared sessions: false | SSL: 2 | Error Reporting: simple | Site Debug: true | Language Debug: false | Default Access: Public | Unicode Slugs: false | dbConnection Type: mysqli | PHP Supports J! 5.2.1: Yes | Database Supports J! 5.2.1: Yes | Database Credentials Present: Yes |

Host Configuration :: OS: FreeBSD | OS Version: 14.1-RELEASE-p5 | Technology: amd64 | Web Server: Apache | Encoding: gzip, deflate, br, zstd | System TMP Writable: Yes | Free Disk Space : 129.64 GiB |

PHP Configuration :: Version: 8.3.14 | PHP API: fpm-fcgi | Session Path Writable: Yes | Display Errors: 0 | Error Reporting: 22527 | Log Errors To: /usr/local/www/vhosts/sitename/logs/php_error.log | Last Known Error: 27th November 2024 14:24:58. | Register Globals: | Magic Quotes: | Safe Mode: | Allow url fopen: 1 | Open Base: /tmp:/usr/local/www/vhosts/sitename/htdocs:/usr/local/www/vhosts/sitename/logs:/usr/local/www/vhosts/sitename/private:/usr/local/www/vhosts/sitename/session:/usr/local/www/vhosts/sitename/tmp | Uploads: 1 | Max. Upload Size: 128M | Max. POST Size: 128M | Max. Input Time: 60 | Max. Execution Time: 30 | Memory Limit: 2G

Database Configuration :: Version: 10.11.9-MariaDB (Client:mysqlnd 8.3.14) | Database Size: 18.52 MiB | #of Tables with config prefix:  76 | #of other Tables:  0 | User Privileges : GRANT ALL
Detailed Environment :: wrote:PHP Extensions :: Core (8.3.14) | date (8.3.14) | libxml (8.3.14) | openssl (8.3.14) | pcre (8.3.14) | hash (8.3.14) | json (8.3.14) | random (8.3.14) | Reflection (8.3.14) | SPL (8.3.14) | session (8.3.14) | standard (8.3.14) | cgi-fcgi (8.3.14) | mysqlnd (mysqlnd 8.3.14) | bcmath (8.3.14) | ctype (8.3.14) | curl (8.3.14) | dom (20031129) | mbstring (8.3.14) | fileinfo (8.3.14) | filter (8.3.14) | gd (8.3.14) | iconv (8.3.14) | imagick (3.7.0) | intl (8.3.14) | ldap (8.3.14) | exif (8.3.14) | mcrypt (1.0.7) | mysqli (8.3.14) | PDO (8.3.14) | zlib (8.3.14) | posix (8.3.14) | SimpleXML (8.3.14) | soap (8.3.14) | sodium (8.3.14) | sqlite3 (8.3.14) | tidy (8.3.14) | tokenizer (8.3.14) | xml (8.3.14) | xmlwriter (8.3.14) | zip (1.22.3) | Phar (8.3.14) | pdo_mysql (8.3.14) | pdo_sqlite (8.3.14) | xmlreader (8.3.14) | Zend OPcache (8.3.14) | Zend Engine (4.3.14) |
Potential Missing Extensions ::
Disabled Functions :: exec | passthru | shell_exec | system |

Switch User Environment :: PHP CGI: Yes | Server SU: No | PHP SU: Yes | Potential Ownership Issues: No
Folder Permissions :: wrote:Core Folders :: images/ (755) | components/ (755) | modules/ (755) | plugins/ (755) | language/ (755) | templates/ (755) | cache/ (755) | logs/ (755) | tmp/ (755) | administrator/components/ (755) | administrator/modules/ (755) | administrator/language/ (755) | administrator/templates/ (755) | administrator/logs/ (755) | api/ (755) |

Elevated Permissions (First 10) ::
Database Information :: wrote:Database statistics :: Uptime: 448749 | Threads: 5 | Questions: 5838365 | Slow queries: 0 | Opens: 1294 | Open tables: 1111 | Queries per second avg: 13.010 |
Extensions Discovered :: wrote:Components :: Site ::
Core ::
3rd Party::

Components :: Admin ::
Core :: com_categories (4.0.0) 1 | com_wrapper (4.0.0) 1 | com_postinstall (4.0.0) 1 | com_users (4.0.0) 1 | com_scheduler (4.1.0) 1 | com_newsfeeds (4.0.0) 1 | com_joomlaupdate (4.0.3) 1 | com_templates (4.0.0) 1 | com_redirect (4.0.0) 1 | com_messages (4.0.0) 1 | com_content (4.0.0) 1 | com_mails (4.0.0) 1 | com_modules (4.0.0) 1 | com_tags (4.0.0) 1 | com_cache (4.0.0) 1 | com_finder (4.0.0) 1 | com_media (3.0.0) 1 | com_login (4.0.0) 1 | com_installer (4.0.0) 1 | com_associations (4.0.0) 1 | com_guidedtours (4.3.0) 1 | com_config (4.0.0) 1 | com_admin (4.0.0) 1 | com_workflow (4.0.0) 1 | com_ajax (4.0.0) 1 | com_languages (4.0.0) 1 | com_fields (4.0.0) 1 | com_banners (4.0.0) 1 | com_privacy (3.9.0) 1 | com_actionlogs (3.9.0) 1 | com_plugins (4.0.0) 1 | com_contenthistory (4.0.0) 1 | com_cpanel (4.0.0) 1 | com_checkin (4.0.0) 1 | com_menus (4.0.0) 1 |
3rd Party::

Modules :: Site ::
Core :: mod_stats (3.0.0) 1 | mod_custom (3.0.0) 1 | mod_login (3.0.0) 1 | mod_menu (3.0.0) 1 | mod_articles_latest (3.0.0) 1 | mod_articles_category (3.0.0) 1 | mod_articles_news (3.0.0) 1 | mod_random_image (3.0.0) 1 | mod_articles_popular (3.0.0) 1 | mod_wrapper (3.0.0) 1 | mod_related_items (3.0.0) 1 | mod_finder (3.0.0) 1 | mod_languages (3.5.0) 1 | MOD_ARTICLES (5.2.0) 1 | mod_banners (3.0.0) 1 | mod_articles_archive (3.0.0) 1 | mod_syndicate (3.0.0) 1 | mod_tags_popular (3.1.0) 1 | mod_breadcrumbs (3.0.0) 1 | mod_articles_categories (3.0.0) 1 | mod_tags_similar (3.1.0) 1 | mod_feed (3.0.0) 1 | mod_footer (3.0.0) 1 | mod_whosonline (3.0.0) 1 | mod_users_latest (3.0.0) 1 |
3rd Party::

Modules :: Admin ::
Core :: mod_custom (3.0.0) 1 | mod_stats_admin (3.0.0) 1 | mod_feed (3.0.0) 1 | mod_toolbar (3.0.0) 1 | mod_messages (4.0.0) 1 | mod_submenu (3.0.0) 1 | mod_post_installation_messages (4.0.0) 1 | mod_privacy_dashboard (3.9.0) 1 | mod_title (3.0.0) 1 | mod_popular (3.0.0) 1 | mod_login (3.0.0) 1 | mod_user (4.0.0) 1 | mod_frontend (4.0.0) 1 | mod_quickicon (3.0.0) 1 | mod_logged (3.0.0) 1 | mod_menu (3.0.0) 1 | mod_guidedtours (4.3.0) 1 | mod_loginsupport (4.0.0) 1 | mod_latest (3.0.0) 1 | mod_latestactions (3.9.0) 1 | mod_sampledata (3.8.0) 1 | mod_privacy_status (4.0.0) 1 | mod_multilangstatus (3.0.0) 1 | mod_version (3.0.0) 1 |
3rd Party::

Libraries ::
Core ::
3rd Party::

Plugins ::
Core :: plg_actionlog_joomla (3.9.0) 1 | plg_privacy_actionlogs (3.9.0) 1 | plg_privacy_message (3.9.0) 1 | plg_privacy_consents (3.9.0) 1 | plg_privacy_content (3.9.0) 1 | plg_privacy_user (3.9.0) 1 | plg_fields_imagelist (3.7.0) 1 | plg_fields_integer (3.7.0) 1 | plg_fields_sql (3.7.0) 1 | plg_fields_url (3.7.0) 1 | plg_fields_list (3.7.0) 1 | plg_fields_media (3.7.0) 1 | plg_fields_editor (3.7.0) 1 | plg_fields_subform (4.0.0) 1 | plg_fields_color (3.7.0) 1 | plg_fields_radio (3.7.0) 1 | plg_fields_text (3.7.0) 1 | plg_fields_checkboxes (3.7.0) 1 | plg_fields_user (3.7.0) 1 | plg_fields_calendar (3.7.0) 1 | plg_fields_usergrouplist (3.7.0) 1 | plg_fields_textarea (3.7.0) 1 | plg_workflow_featuring (4.0.0) 1 | plg_workflow_publishing (4.0.0) 1 | plg_workflow_notification (4.0.0) 1 | plg_system_shortcut (4.2.0) 1 | plg_system_httpheaders (4.0.0) 0 | plg_system_stats (3.5.0) 0 | plg_system_schedulerunner (4.1) 1 | plg_system_fields (3.7.0) 1 | plg_system_privacyconsent (3.9.0) 0 | plg_system_languagecode (3.0.0) 0 | plg_system_languagefilter (3.0.0) 0 | plg_system_jooa11y (4.2.0) 1 | plg_system_actionlogs (3.9.0) 0 | plg_system_schemaorg (5.0.0) 1 | plg_system_skipto (4.0.0) 1 | plg_system_remember (3.0.0) 1 | plg_system_logout (3.0.0) 1 | plg_system_debug (3.0.0) 1 | plg_system_sef (3.0.0) 1 | plg_system_log (3.0.0) 1 | plg_system_webauthn (4.0.0) 1 | plg_system_cache (3.0.0) 0 | plg_system_task_notification (4.1) 1 | plg_system_redirect (3.0.0) 1 | plg_system_accessibility (4.0.0) 0 | plg_system_highlight (3.0.0) 1 | plg_system_guidedtours (4.3.0) 1 | plg_filesystem_local (4.0.0) 1 | plg_sampledata_multilang (4.0.0) 1 | plg_user_joomla (3.0.0) 1 | plg_user_terms (3.9.0) 0 | plg_user_token (3.9.0) 1 | plg_user_contactcreator (3.0.0) 0 | plg_user_profile (3.0.0) 0 | plg_authentication_joomla (3.0.0) 1 | plg_authentication_cookie (3.0.0) 1 | plg_authentication_ldap (3.0.0) 0 | plg_editors-xtd_menu (3.7.0) 1 | plg_editors-xtd_module (3.5.0) 0 | plg_editors-xtd_article (3.0.0) 1 | plg_editors-xtd_image (3.0.0) 1 | plg_editors-xtd_readmore (3.0.0) 1 | plg_editors-xtd_pagebreak (3.0.0) 1 | plg_editors-xtd_fields (3.7.0) 1 | plg_finder_contacts (3.0.0) 0 | plg_finder_categories (3.0.0) 0 | plg_finder_tags (3.0.0) 0 | plg_finder_newsfeeds (3.0.0) 0 | plg_finder_content (3.0.0) 0 | plg_schemaorg_event (5.0.0) 1 | plg_schemaorg_person (5.0.0) 1 | plg_schemaorg_blogposting (5.0.0) 1 | plg_schemaorg_organization (5.0.0) 1 | plg_schemaorg_custom (5.1.0) 1 | plg_schemaorg_recipe (5.0.0) 1 | plg_schemaorg_jobposting (5.0.0) 1 | plg_schemaorg_article (5.1.0) 1 | plg_schemaorg_book (5.0.0) 1 | plg_task_globalcheckin (5.0.0) 1 | plg_task_deleteactionlogs (5.0.0) 1 | plg_task_rotatelogs (5.0.0) 1 | plg_task_check_files (4.1) 1 | plg_task_privacyconsent (5.0.0) 1 | plg_task_updatenotification (5.0.0) 1 | plg_task_requests (4.1) 1 | plg_task_sessiongc (5.0.0) 1 | plg_task_site_status (4.1) 1 | plg_captcha_recaptcha_invisible (3.8) 1 | plg_quickicon_overridecheck (4.0.0) 1 | plg_quickicon_phpversioncheck (3.7.0) 0 | plg_quickicon_eos (4.4.0) 1 | plg_quickicon_privacycheck (3.9.0) 1 | plg_quickicon_joomlaupdate (3.0.0) 0 | plg_quickicon_downloadkey (4.0.0) 1 | plg_quickicon_extensionupdate (3.0.0) 0 | plg_content_vote (3.0.0) 1 | plg_content_pagenavigation (3.0.0) 1 | plg_content_pagebreak (3.0.0) 1 | plg_content_finder (3.0.0) 0 | plg_content_joomla (3.0.0) 1 | plg_content_confirmconsent (3.9.0) 0 | plg_content_loadmodule (3.0.0) 1 | plg_content_fields (3.7.0) 1 | plg_content_emailcloak (3.0.0) 1 | plg_media-action_crop (4.0.0) 1 | plg_media-action_resize (4.0.0) 1 | plg_media-action_rotate (4.0.0) 1 | plg_multifactorauth_yubikey (3.2.0) 0 | plg_multifactorauth_totp (3.2.0) 0 | plg_multifactorauth_webauthn (4.2.0) 0 | plg_multifactorauth_fixed (4.2.0) 0 | plg_multifactorauth_email (4.2.0) 0 | plg_webservices_messages (4.0.0) 1 | plg_webservices_tags (4.0.0) 1 | plg_webservices_users (4.0.0) 1 | plg_webservices_templates (4.0.0) 1 | plg_webservices_modules (4.0.0) 1 | plg_webservices_newsfeeds (4.0.0) 1 | plg_webservices_redirect (4.0.0) 1 | plg_webservices_content (4.0.0) 1 | plg_webservices_media (4.1.0) 1 | plg_webservices_languages (4.0.0) 1 | plg_webservices_config (4.0.0) 1 | plg_webservices_banners (4.0.0) 1 | plg_webservices_privacy (4.0.0) 1 | plg_webservices_installer (4.0.0) 1 | plg_webservices_plugins (4.0.0) 1 | plg_webservices_menus (4.0.0) 1 | plg_installer_override (4.0.0) 1 | plg_installer_urlinstaller (3.6.0) 0 | plg_installer_folderinstaller (3.6.0) 0 | plg_installer_packageinstaller (3.6.0) 1 | plg_installer_webinstaller (4.0.0) 1 | plg_extension_joomla (3.0.0) 1 | plg_extension_namespacemap (4.0.0) 1 | plg_extension_finder (4.0.0) 1 | plg_behaviour_taggable (4.0.0) 1 | plg_behaviour_versionable (4.0.0) 1 | plg_behaviour_compat (5.0.0) 1 | plg_api-authentication_token (4.0.0) 1 | plg_api-authentication_basic (4.0.0) 0 |
3rd Party:: plg_editors_tinymce (6.8.4) 1 | plg_editors_codemirror (6.0.0) 1 |
Templates Discovered :: wrote:Templates :: Site :: cassiopeia (1.0) 1 |
Templates :: Admin :: atum (1.0) 1 |
Last edited by toivo on Wed Nov 27, 2024 10:42 pm, edited 1 time in total.
Reason: mod note: disabled smilies in post Options for readability

Advertisement
User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31391
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Memory exhausted error when updating site (upgraded from J3)

Post by Per Yngve Berg » Wed Nov 27, 2024 2:25 pm

Log Errors To: /usr/local/www/vhosts/sitename/logs/php_error.log

Have you tried to reset the Log File?

User avatar
AMurray
Joomla! Master
Joomla! Master
Posts: 10335
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Memory exhausted error when updating site (upgraded from J3)

Post by AMurray » Wed Nov 27, 2024 9:51 pm

Even though it appears your memory limit is 2G (2147483648 bytes), it's still trying to allocate more memory above that limit - additional 69632 bytes (as per what the error says).

if this is your own server or a VPS, can you increase the limit even further than 2G?

I don't know why you'd need that much memory limit - most Joomla sites run on 256M or 512M
Regards - A Murray
General Support Moderator

bjrn
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Jan 29, 2013 2:32 pm

Re: Memory exhausted error when updating site (upgraded from J3)

Post by bjrn » Thu Nov 28, 2024 8:27 am

While the issue hasn't been actually resolved, I finally got it working by giving the PHP process permissions on the directory above the web root. I still have no idea what is causing the error, why this workaround had an effect, or how to actually solve the issue. As mentioned before I have other sites with the exact same server configuration that don't need these additional permissions.

My guess it's that it's somehow related to the 3 → 4 → 5 migration. During the migration there were locked non-compatible (first party) extensions that hadn't been cleaned up, and my guess is that there is something in the database that the Joomla migration scripts are missing or aren't properly handling.


AMurray wrote: Wed Nov 27, 2024 9:51 pmif this is your own server or a VPS, can you increase the limit even further than 2G?
Just to quickly respond to this. The 69632 bytes is just the amount that tips it over 2GB. I can keep increasing it, but then it would fail at some small amount of bytes over the new limit.

gws
Joomla! Champion
Joomla! Champion
Posts: 6452
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Memory exhausted error when updating site (upgraded from J3)

Post by gws » Thu Nov 28, 2024 8:30 am

Why are you using ; Open Base: /tmp:/usr/local/www/vhosts/sitename/htdocs:/usr/local/www/vhosts/sitename/logs:/usr/local/www/vhosts/sitename/private:/usr/local/www/vhosts/sitename/session:/usr/local/www/vhosts/sitename/tmp
Open base is a dinosaur and not necessary on modern servers.

bjrn
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Jan 29, 2013 2:32 pm

Re: Memory exhausted error when updating site (upgraded from J3)

Post by bjrn » Thu Nov 28, 2024 3:14 pm

gws wrote: Thu Nov 28, 2024 8:30 amWhy are you using [open_basedir]
Is there a specific reason I shouldn't be using it? It did highlight an access error in Joomla here.

gws
Joomla! Champion
Joomla! Champion
Posts: 6452
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Memory exhausted error when updating site (upgraded from J3)

Post by gws » Thu Nov 28, 2024 3:34 pm

I suggest you google it.

bjrn
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Jan 29, 2013 2:32 pm

Re: Memory exhausted error when updating site (upgraded from J3)

Post by bjrn » Thu Nov 28, 2024 3:41 pm

gws wrote: Thu Nov 28, 2024 3:34 pmI suggest you google it.
I did before asking. The main reasons seems to be a minor performance hit and that poorly written CMS extensions might run into issues. It would be great if you could point me into a general direction because clearly I'm missing something.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31391
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Memory exhausted error when updating site (upgraded from J3)

Post by Per Yngve Berg » Thu Nov 28, 2024 5:12 pm

open_basedir is deprecated. Linux User Permissions is now used when building servers.

bjrn
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Jan 29, 2013 2:32 pm

Re: Memory exhausted error when updating site (upgraded from J3)

Post by bjrn » Fri Nov 29, 2024 8:07 am

Thank you for the answer. open_basedir is in fact not deprecated (see the official documentation) and while its use has overlap with user permissions, they do slightly different things and hopefully as long as people have been using they've also been using properly set permissions.

I will certainly keep an eye on it in the future to see if we should stop using it. Thank you both for your responses.

Advertisement

Post Reply

Return to “Migrating and Upgrading to Joomla! 5.x”