Page 1 of 1

Memory problems (works fine on another host)

Posted: Mon Jun 21, 2021 6:10 pm
by paulbaker
Having an issue with an upgrade.

Started at 1.11.4. Site has unknown history. Upgraded on my server successfully through 1.11.13 > 1.12.2 > 2.2.15. Worked fine on my server (PHP 7.2). See system info below.

Transferred site to client's hosting. Note this is upgrade site 4 of 5, all of which very similar, first 3 work on client's host perfectly. Client's host is set to PHP 7.3 (only that and 7.4 available).

When accessing client hosted site admin area I get
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 262144 bytes) in /home/pirbrigh/public_html/websites/pirbrightaircon.com/lib/classes/Database/class.Connection.php on line 355

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 262144 bytes) in /home/pirbrigh/public_html/websites/pirbrightaircon.com/lib/classes/class.CmsApp.php on line 478
In class.Connection.php, this line is part of a function that calls an SQL statement and I happen to know the statement is

Code: Select all

SELECT sitepref_name,sitepref_value FROM cms_siteprefs
and this function is called 10201 times (don't ask me how I know this...) so that is probably why it runs out of memory?

Things I have done:
Cleared CMSMS cache
Turned on debug
Determined it is connecting to DB OK (I get different message when I change DB password in config.php)
Performed sytem verification on the system working on my host. I get a whole load of missing lang files (no problem) and
9 Files failed md5sum check:
/lib/lang/cms_selflink/ext/pt_PT.php
/lib/lang/tasks/ext/nb_NO.php
/modules/DesignManager/moduleinfo.ini
/modules/FileManager/moduleinfo.ini
/modules/FilePicker/moduleinfo.ini
/modules/MicroTiny/moduleinfo.ini
/modules/ModuleManager/moduleinfo.ini
/modules/News/moduleinfo.ini
/modules/Search/moduleinfo.ini
2 x system information below:
SITE WORKING FINE ON MY SERVER
and
ANOTHER UPGRADED SITE WORKING FINE ON CLIENT'S HOSTING
for comparison.

Would be grateful for ideas on this one.

Thanks :)





SITE WORKING FINE ON MY SERVER:
----------------------------------------------

Cms Version: 2.2.15

Installed Modules:

AdminSearch: 1.0.5
CGExtensions: 1.65.2
CGFeedMaker: 1.0.17
CGSimpleSmarty: 2.2.1
CMSContentManager: 1.1.9
CMSMailer: 6.2.14
CmsJobManager: 0.1.3
DesignManager: 1.1.9
FileManager: 1.6.12
FilePicker: 1.0.5
Gallery: 2.4.2
MenuManager: 1.50.3
MicroTiny: 2.2.5
ModuleManager: 2.1.8
Navigator: 1.0.9
News: 2.51.11
Search: 1.52
ThemeManager: 1.1.8
TinyMCE: 3.3.2

Config Information:

php_memory_limit:
max_upload_size: 2000000
url_rewriting:
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Europe/London
permissive_smarty: false

Php Information:

phpversion: 7.2.34
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 32767
E_STRICT: 2048
E_DEPRECATED: 8192
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 128M
max_execution_time: 30
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /opt/alt/php72/var/lib/php/session (0700)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On

Performance Information:

allow_browser_cache: Off (False)
browser_cache_expiry: 60
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: Off (False)
Server Information:

Server Software: Apache
Server Api: cgi-fcgi
Server Os: Linux 3.10.0-962.3.2.lve1.5.54.el7.x86_64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.3.29
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable

Permission Information:

tmp: /home/cthuk/public_html/paircon/tmp (0755)
tmp_cache: /home/cthuk/public_html/paircon/tmp/cache (0755)
templates_c: /home/cthuk/public_html/paircon/tmp/templates_c (0755)
modules: /home/cthuk/public_html/paircon/modules (0755)
uploads: /home/cthuk/public_html/paircon/uploads (0755)
File Creation Mask (umask): /home/cthuk/public_html/paircon/tmp/cache (0755)
config_file: 0444
----------------------------------------------







ANOTHER UPGRADED SITE WORKING FINE ON CLIENT'S HOSTING:
----------------------------------------------

Cms Version: 2.2.15

Installed Modules:

AdminSearch: 1.0.5
CGExtensions: 1.65.2
CGSimpleSmarty: 2.2.1
CMSContentManager: 1.1.9
CMSMailer: 6.2.14
CmsJobManager: 0.1.3
DesignManager: 1.1.9
FileManager: 1.6.12
FilePicker: 1.0.5
Gallery: 2.4.2
MenuManager: 1.50.3
MicroTiny: 2.2.5
ModuleManager: 2.1.8
Navigator: 1.0.9
News: 2.51.11
Printing: 1.1.2
Search: 1.52
ThemeManager: 1.1.8

Config Information:

php_memory_limit:
max_upload_size: 64000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Europe/London
permissive_smarty: false

Php Information:

phpversion: 7.3.28
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 32759
E_STRICT: 2048
E_DEPRECATED: 8192
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 32M
max_execution_time: 30
register_globals: Off (False)
output_buffering: On
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 64M
upload_max_filesize: 64M
session_save_path: /var/cpanel/php/sessions/ea-php73 (0700)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On

Performance Information:

allow_browser_cache: Off (False)
browser_cache_expiry: 60
php_opcache: On (True)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: Off (False)
Server Information:

Server Software: Apache
Server Api: cgi-fcgi
Server Os: Linux 3.10.0-962.3.2.lve1.5.39.el7.x86_64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.2.38
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable

Permission Information:

tmp: /home/pirbrigh/public_html/websites/x.co.uk/tmp (0755)
tmp_cache: /home/pirbrigh/public_html/websites/x.co.uk/tmp/cache (0755)
templates_c: /home/pirbrigh/public_html/websites/x.co.uk/tmp/templates_c (0755)
modules: /home/pirbrigh/public_html/websites/x.co.uk/modules (0755)
uploads: /home/pirbrigh/public_html/websites/x.co.uk/uploads (0755)
File Creation Mask (umask): /home/pirbrigh/public_html/websites/x.co.uk/tmp/cache (0755)
config_file: 0444
----------------------------------------------

Re: Memory problems (works fine on another host)

Posted: Tue Jun 22, 2021 1:46 pm
by paulbaker
Oh boy. This turned out to be an empty database. :-[ I created the database and a user with privileges but forgot to populate the database with data. In my defence, the error messages aren't particularly helpful in this situation.

[goes for a lie down in a darkened room] ;D