Jump to content
thirty bees forum

Recommended Posts

Posted

Hi!

I am trying to finally migrate our shops to a new a little more powerful vps with newer OS and Mysql server. 

I have used the Rsync method to transfer the public_html folder and a sqldump to move the db. But I get a 500 error when I try to open it on the new server. What is it I have missed or been douing wrong. Any help appreciated

Posted

@datakick

Errormessages below. As I understand a cache problem. I cleaned the cache and switched all cachesettings off before the migration, but perhaps I could delete some cache files/folders also? Advise please

[Tue Aug 09 11:01:09.994052 2022] [proxy_fcgi:error] [pid 17639] [client 69.162.124.235:51082] AH01071: Got error 'PHP message: PHP Warning:  Creating default object from empty value in /home/jv74/public_html/cache/smarty/compile/87/a4/f5/87a4f5b16ef3376726317ad2fb0f52169b9043ca_0.file.blockcart.tpl.php on line 256PHP message: PHP Notice:  Undefined index: link_rewrite in /home/jv74/public_html/cache/smarty/compile/3c/ec/83/3cec835ea2c1315898dbca134b31ae23de74765d_0.file.at_catproduct.tpl.cache.php on line 85PHP message: PHP Notice:  Undefined index: link_rewrite in /home/jv74/public_html/cache/smarty/compile/3c/ec/83/3cec835ea2c1315898dbca134b31ae23de74765d_0.file.at_catproduct.tpl.cache.php on line 85PHP message: PHP Notice:  Undefined index: link_rewrite in /home/jv74/public_html/cache/smarty/compile/3c/ec/83/3cec835ea2c1315898dbca134b31ae23de74765d_0.file.at_catproduct.tpl.cache.php on line 85PHP message: PHP Notice:  Undefined index: link_rewrite in /home/jv74/public_html/cache/smarty/compile/3c/ec/83/3cec835ea2c1315898dbca134b31ae23de74765d_0.file.at_catproduct.tpl.cache.php on line 85', referer: https://jv74.se
[Tue Aug 09 11:06:10.056726 2022] [proxy_fcgi:error] [pid 17632] [client 69.162.124.235:56582] AH01071: Got error 'PHP message: PHP Warning:  Creating default object from empty value in /home/jv74/public_html/cache/smarty/compile/87/a4/f5/87a4f5b16ef3376726317ad2fb0f52169b9043ca_0.file.blockcart.tpl.php on line 256PHP message: PHP Notice:  Undefined index: link_rewrite in /home/jv74/public_html/cache/smarty/compile/3c/ec/83/3cec835ea2c1315898dbca134b31ae23de74765d_0.file.at_catproduct.tpl.cache.php on line 85PHP message: PHP Notice:  Undefined index: link_rewrite in /home/jv74/public_html/cache/smarty/compile/3c/ec/83/3cec835ea2c1315898dbca134b31ae23de74765d_0.file.at_catproduct.tpl.cache.php on line 85PHP message: PHP Notice:  Undefined index: link_rewrite in /home/jv74/public_html/cache/smarty/compile/3c/ec/83/3cec835ea2c1315898dbca134b31ae23de74765d_0.file.at_catproduct.tpl.cache.php on line 85PHP message: PHP Notice:  Undefined index: link_rewrite in /home/jv74/public_html/cache/smarty/compile/3c/ec/83/3cec835ea2c1315898dbca134b31ae23de74765d_0.file.at_catproduct.tpl.cache.php on line 85', referer: https://jv74.se
[Tue Aug 09 11:07:43.619874 2022] [proxy_fcgi:error] [pid 17635] [client 17.121.114.145:37226] AH01071: Got error 'PHP message: PHP Warning:  Creating default object from empty value in /home/jv74/public_html/cache/smarty/compile/87/a4/f5/87a4f5b16ef3376726317ad2fb0f52169b9043ca_0.file.blockcart.tpl.php on line 256'
[Tue Aug 09 11:11:09.127198 2022] [proxy_fcgi:error] [pid 17595] [client 69.162.124.235:43540] AH01071: Got error 'PHP message: PHP Warning:  Creating default object from empty value in /home/jv74/public_html/cache/smarty/compile/87/a4/f5/87a4f5b16ef3376726317ad2fb0f52169b9043ca_0.file.blockcart.tpl.php on line 256PHP message: PHP Notice:  Undefined index: link_rewrite in /home/jv74/public_html/cache/smarty/compile/3c/ec/83/3cec835ea2c1315898dbca134b31ae23de74765d_0.file.at_catproduct.tpl.cache.php on line 85PHP message: PHP Notice:  Undefined index: link_rewrite in /home/jv74/public_html/cache/smarty/compile/3c/ec/83/3cec835ea2c1315898dbca134b31ae23de74765d_0.file.at_catproduct.tpl.cache.php on line 85PHP message: PHP Notice:  Undefined index: link_rewrite in /home/jv74/public_html/cache/smarty/compile/3c/ec/83/3cec835ea2c1315898dbca134b31ae23de74765d_0.file.at_catproduct.tpl.cache.php on line 85PHP message: PHP Notice:  Undefined index: link_rewrite in /home/jv74/public_html/cache/smarty/compile/3c/ec/83/3cec835ea2c1315898dbca134b31ae23de74765d_0.file.at_catproduct.tpl.cache.php on line 85', referer: https://jv74.se
[Tue Aug 09 11:12:06.314172 2022] [proxy_fcgi:error] [pid 11940] [client 66.249.66.158:39942] AH01071: Got error 'PHP message: PHP Warning:  Creating default object from empty value in /home/jv74/public_html/cache/smarty/compile/87/a4/f5/87a4f5b16ef3376726317ad2fb0f52169b9043ca_0.file.blockcart.tpl.php on line 256'
[Tue Aug 09 11:12:13.814316 2022] [proxy_fcgi:error] [pid 17635] [client 66.249.66.159:55962] AH01071: Got error 'PHP message: PHP Warning:  Creating default object from empty value in /home/jv74/public_html/cache/smarty/compile/87/a4/f5/87a4f5b16ef3376726317ad2fb0f52169b9043ca_0.file.blockcart.tpl.php on line 256'
[Tue Aug 09 11:12:20.825219 2022] [proxy_fcgi:error] [pid 17639] [client 66.249.66.158:35442] AH01071: Got error 'PHP message: PHP Warning:  Creating default object from empty value in /home/jv74/public_html/cache/smarty/compile/87/a4/f5/87a4f5b16ef3376726317ad2fb0f52169b9043ca_0.file.blockcart.tpl.php on line 256'
 

Posted

[Tue Aug 09 11:39:43.970412 2022] [proxy_fcgi:error] [pid 8199:tid 140591677544192] [client 192.241.235.244:50742] AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/seven4/public_html/classes/db/DbPDO.php on line 73PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/seven4/public_html/classes/ErrorHandler.php on line 193'

Posted

There you go. Your php server has Memory limit set to 128MB memory, which is not enough in your case. Increase it in php.ini, or via your cpanel or whatever server management tool you are using.

Posted

The strange this is that in the old one its also set to 128 and thats enough. have to investigate.

Changed in the new to 512 rebooted but no change

Posted

This one is the one after the reboot

[Tue Aug 09 12:18:59.971275 2022] [proxy_fcgi:error] [pid 17553:tid 139926720988928] [client 185.60.237.38:46234] AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 69632 bytes) in /home/seven4/public_html/classes/db/DbPDO.php on line 73PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/seven4/public_html/classes/PrestaShopAutoload.php on line 263'
 

 

Posted

Expanding memory did not help

[Tue Aug 09 12:36:42.703583 2022] [proxy_fcgi:error] [pid 24119:tid 139926830479104] [client 185.60.237.38:47084] AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /home/seven4/public_html/classes/db/DbPDO.php on line 73PHP message: PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /home/seven4/public_html/classes/ErrorHandler.php on line 193'

Posted

@datakick as we're speaking for php configurations here can you share a guidance on which db drivers to use in order to gain every little bit? Also what extensions are needed for TB and which ones we can safely turn off (other than opcache, apc, imagick, etc...)?

 

Posted

The error location is weird - creation of PDO object should not consume all available memory.

One possible reason is some sort of loop, when exception is thrown when trying to establish db connection, and error handler tries to retrieve some data from db, which leads again to attempt to estabilish connection. This kind of loop can consume all memory.

Double check your connection settings.

Posted

@datakick

settings.inc

Looks correct

The only thing is this lines about memcache that is not installed on this server

define('_DB_SERVER_', 'localhost');
define('_DB_NAME_', 'db_jv74');
define('_DB_USER_', 'jv74');
define('_DB_PASSWD_', 'xxxxxxxx');
define('_DB_PREFIX_', 'ps_');
define('_MYSQL_ENGINE_', 'MyISAM');
define('_PS_CACHING_SYSTEM_', 'CacheMemcache');
define('_PS_CACHE_ENABLED_', '0');
define('_COOKIE_KEY_', 'EW14dGdgFNqqE3AgLSjXvmbue5p6uBGt4AvTWeSYVaFO6BJACZ8HdAea');
define('_COOKIE_IV_', 'M0Wb22fJ');
define('_PS_CREATION_DATE_', '2016-09-01');
define('_PS_VERSION_', '1.6.1.999');
define('_TB_VERSION_', '1.4.0');
define('_RIJNDAEL_KEY_', 'ish7GerF6In1RXpSaVYcseigqCPIv4Oy');
define('_RIJNDAEL_IV_', 'nqT3Sj8kz6AWqjlObU4OCA==');
define('_PS_DIRECTORY_', '/../../');
define('_PHP_ENCRYPTION_KEY_', 'def000008191607ea7718df3adf8fd33b20a58f11acae1bec4e13cf54b3c000a13dcb2e5d4a7cb76c473d33c5c3d6d4acb43d627e33ce546a018a498cd7c121fbd379f2a');
define('_TB_REVISION_', '7c468f3ccd75167e05b5a87a99cb666fd4d78bd8');

Posted

Never share content of your settings.php file. Now your encryption keys are leaked and you will have to generate new one.

Anyway, try ti surround line 73 of classes/db/DbPDO.php into 

try { ...orig code here... } catch (Exception $e) { d($e)}

Posted

 

@datakick

 

Ok I will create a new key. Thanks

Unfortunately it is still horribly slow. I hoped it would be better on a new server with double ram 16 gb, newer mysql server 8.3 and new ubuntu 20. but it is still the same

old ones

jv74.se

jv80.se

These to are clones sitting on the same server. Same amount of products about, same modules, same settings. But huge difference in loadspeed. On both BO is no problem
74.jv74.se is the migrated one. I have no clue where to look for the slow loadtime problem

Posted
18 minutes ago, Havouza said:

Ok I will create a new key. Thanks

keys. _COOKIE_KEY_ , _COOKIE_IV_, and _PHP_ENCRYPTION_KEY_. And you should delete _RIJNDAEL_* entries

18 minutes ago, Havouza said:

Unfortunately it is still horribly slow. I hoped it would be better on a new server with double ram 16 gb, newer mysql server 8.3 and new ubuntu 20. but it is still the same

Enable Profiling in Performance. That will tell you more

Posted

@datakick

I have fixed the problem. Unfortunately it does not change the cat that the new server is slow as the old one. I am running bleeding edge but perhaps ther is some new updates that is not installed here

Posted

Not great, but not terrible either. Your php server takes 836ms to respond. But effectively it takes couple seconds for the response to receive. My tests shows 10seconds:

> time curl https://jv74.se > /dev/null
0.02s user 0.02s system 0% cpu 10.197 total

If it's not PHP server that is slow (at least not terribly), then there is probably some other component in your stack that blocks the response: nginx / proxy server / whatnot.

Posted

Oh, I just noticed that the profiling info is from your back office 🙂 you need to provide profiling from your front office page that is actually slow.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...