MySQL Server Has Gone Away (MariaDB - MEMORY Engine) - mariadb

I have an OpenCart website with a bunch of plugins with encrypted files. As I added more and more products (150k currently) it became slower & slower. Since I cannot change the queries (files are encrypted) I had to change some of my tables' storage engine to MEMORY. My query times went from 50 seconds to 2 seconds.
But there is a new problem. If I try to open 4 or 5 pages at the same time DB server crashes. This is a managed VPS so I don't have access to everything. Hosting's support isn't helping at all and telling me not to use MEMORY as it is uncompatible!
I have the exact same setup on my localhost (only difference is that webhost is MariaDB but I use MySQL on my localhost) and I cannot reproduce the error on it how hard I try.
Here is the error log from within OpenCart:
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): MySQL server has gone away in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): Error reading result set's header in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26733 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): (00000/0): in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): MySQL server has gone away in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): Error reading result set's header in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): MySQL server has gone away in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): Error reading result set's header in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Notice: Trying to get property of non-object in /home/grdrop/public_html/catalog/model/extension/module/yumenu.php on line 163
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26732 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26718 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26722 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26730 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26725 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26726 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:43 - PHP Warning: Error while sending QUERY packet. PID=26734 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:43 - PHP Warning: Error while sending QUERY packet. PID=26724 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:43 - PHP Warning: Error while sending QUERY packet. PID=26727 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:44 - PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in /home/grdrop/public_html/system/library/db/mysqli.php on line 7
2018-04-26 22:32:44 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:44 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:44 - PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in /home/grdrop/public_html/system/library/db/mysqli.php on line 7
2018-04-26 22:32:44 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:44 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:45 - PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in /home/grdrop/public_html/system/library/db/mysqli.php on line 7
2018-04-26 22:32:45 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:45 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:45 - PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in /home/grdrop/public_html/system/library/db/mysqli.php on line 7
2018-04-26 22:32:45 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:45 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:45 - PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in /home/grdrop/public_html/system/library/db/mysqli.php on line 7
I don't know much about DBs & I am completely lost here. If this is memory related issue isn't there a variable or setting that I can change so that DB waits until the first queries to finish & continue when there is enough RAM ?

Related

Pimcore - Syntax error or access violation: 1305 FUNCTION db_name.PLUGIN_CMF_COLLECT_OBJECT_SEGMENT_ASSIGNMENTS does not exist in

I have a pimcore (6.8) setup in our local system with apache2, php7.4 with all permission, mysql (8) ubuntu from a live site for version upgrade. This website is working with live but not working in our local system. When i login to the admin panel with this website locally. Then working perfectly. But when I open any page in frontend then it shows
"Oops ... Sorry, the page you're looking for has gone."
And showing in dashboard when load any document but data in showing
Timestamp: Mon Dec 05 2022 15:00:45 GMT+0530 (India Standard Time)
Status: 500 | Internal Server Error
URL: /admin/customermanagementframework/segment-assignment/inheritable-segments?id=65&type=document&_dc=1670232645843
Method: GET
Message: Database error, see logs for details
Logs Details-
Syntax error or access violation: 1305 FUNCTION db_name.PLUGIN_CMF_COLLECT_OBJECT_SEGMENT_ASSIGNMENTS does not exist in
Now i have changed the DB version as live website now showing this error
[2022-12-09 01:34:45] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Lock\Exception\LockAcquiringException: "Failed to acquire the "Pimcore\Routing\RedirectHandler" lock." at /var/www/html/blackbusinessatlas/vendor/symfony/symfony/src/Symfony/Component/Lock/Lock.php line 119 {"exception":"[object] (Symfony\Component\Lock\Exception\LockAcquiringException(code: 0): Failed to acquire the "Pimcore\Routing\RedirectHandler" lock. at /var/www/html/blackbusinessatlas/vendor/symfony/symfony/src/Symfony/Component/Lock/Lock.php:119, Doctrine\DBAL\Exception\ConnectionException(code: 0): An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory at /var/www/html/blackbusinessatlas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:97, Doctrine\DBAL\Driver\PDOException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory at /var/www/html/blackbusinessatlas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31, PDOException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory at /var/www/html/blackbusinessatlas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27)"} []

When i install the wordpress theme it shows me like this

What should i do to remove this bug or error ?
I have downloaded the theme but when i install it,It actually shows this
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo
failed: Temporary failure in name resolution in
/customers/3/3/f/mabox-ks.com/httpd.www/wp-content/themes/amytheme/inc/update-notifier.php
on line 115
Warning:
file_get_contents(http://themes.cray.bg/themeupdatesnotifier/amy.xml):
failed to open stream: php_network_getaddresses: getaddrinfo failed:
Temporary failure in name resolution in
/customers/3/3/f/mabox-ks.com/httpd.www/wp-content/themes/amytheme/inc/update-notifier.php
on line 115
Warning: Cannot modify header information - headers already sent by
(output started at
/customers/3/3/f/mabox-ks.com/httpd.www/wp-content/themes/amytheme/inc/update-notifier.php:115)
in /customers/3/3/f/mabox-ks.com/httpd.www/wp-admin/includes/misc.php
on line 1114
Warning: Cannot modify header information - headers already sent by
(output started at
/customers/3/3/f/mabox-ks.com/httpd.www/wp-content/themes/amytheme/inc/update-notifier.php:115)
in
/customers/3/3/f/mabox-ks.com/httpd.www/wp-content/themes/amytheme/ReduxFramework/ReduxCore/framework.php
on line 2498
Warning: Cannot modify header information - headers already sent by
(output started at
/customers/3/3/f/mabox-ks.com/httpd.www/wp-content/themes/amytheme/inc/update-notifier.php:115)
in
/customers/3/3/f/mabox-ks.com/httpd.www/wp-content/themes/amytheme/ReduxFramework/ReduxCore/framework.php
on line 2499
Warning: Cannot modify header information - headers already sent by
(output started at
/customers/3/3/f/mabox-ks.com/httpd.www/wp-content/themes/amytheme/inc/update-notifier.php:115)
in
/customers/3/3/f/mabox-ks.com/httpd.www/wp-content/themes/amytheme/ReduxFramework/ReduxCore/framework.php
on line 2504
Warning: Cannot modify header information - headers already sent by
(output started at
/customers/3/3/f/mabox-ks.com/httpd.www/wp-content/themes/amytheme/inc/update-notifier.php:115)
in /customers/3/3/f/mabox-ks.com/httpd.www/wp-includes/pluggable.php
on line 1216

Error in php code after php and mysql upgrades

My server has been upgraded and since then one of my old application is not working
PHP
from PHP Version 5.04 to PHP Version 5.4.156.
MYSQL
MySQL database has been upgrade from MySQL version 4.1 to MariaDB Version 5.5.52(MySQL Compatiable).
Here am attaching some of the error codes and if anybody have any ideas please help to solve this issue.
Error in login
This is the error and corresponding lines of codes.
PHP Fatal error: Call to undefined function import_request_variables() in
/user/jsf/public_html/guru/post_login.php on line 3 import_request_variables ("p","p_");
PHP Notice: Undefined index: hash in /user/jsf/public_html/guru/check_login.inc
on line 7 $query.=$_REQUEST['hash']."' and login='".$_REQUEST['login']."'";
PHP Notice: Use of undefined constant is_on_server - assumed 'is_on_server' in
/user/jsf/secret/defs.inc on line 2 define (is_on_server,TRUE);
Error in Registration
PHP Notice: Use of undefined constant is_on_server - assumed 'is_on_server' in
/user/jsf/secret/defs.inc on line 2, referer: http://www.test.com/~jsf/akl/login.php define (is_on_server,TRUE);
PHP Notice: Use of undefined constant MYSQL_SERVER - assumed 'MYSQL_SERVER' in
/user/jsf/secret/defs.inc on line 13, referer: http://www.test.com/~jsf/akl/login.php define (MYSQL_SERVER,"hostname");
PHP Notice: Use of undefined constant MYSQL_NAME - assumed 'MYSQL_NAME' in
/user/jsf/secret/defs.inc on line 14, referer: http://www.test.com/~jsf/akl/login.php define (MYSQL_NAME,"dbname");
PHP Notice: Use of undefined constant MYSQL_PASSWORD - assumed 'MYSQL_PASSWORD'
in /user/jsf/secret/defs.inc on line 15, referer: http://www.test.com/~jsf/akl/login.php define (MYSQL_PASSWORD,"password");
PHP Notice: Use of undefined constant MYSQL_DB - assumed 'MYSQL_DB' in
/user/jsf/secret/defs.inc on line 16, referer: http://www.test.com/~jsf/akl/login.php define (MYSQL_DB,"db name");
PHP Notice: Undefined variable: error in /user/jsf/public_html/akl/register.php
on line 37, referer: http://www.test.com/~jsf/akl/login.php <?php if ($error)
PHP Fatal error: Call to undefined function import_request_variables() in
/user/jsf/public_html/akl/register.php on line 52, referer: http://www.test.com/~jsf/akl/login.php import_request_variables ('p','p_');

ScssPhp Assetic filter doesn't work on dev mode

I'm trying to compile the twitter bootstrap with Assetic and ScssPhp in Symfony.
The following command work well
php bin/console assetic:dump --env=prod --no-debug
Bootstrap are well compiled and work in prod mode.
But in dev mode, all CSS files work excepted bootstrap.css. An internal error is given for bootstrap css. In the Apache log I have this:
[Fri Dec 02 14:30:23.578786 2016] [:error] [pid 13015] [client
127.0.0.1:59442] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in
/home/niga/www/public/messenger/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php
on line 65
Symfony log:
[2016-12-02 14:46:41] request.INFO: Matched route "{route}".
{"route":"_assetic_99d6e1c_0","route_parameters":{"_controller":"assetic.controller:render","name":"99d6e1c","pos":0,"_format":"css","_route":"_assetic_99d6e1c_0"},"request_uri":"http://127.0.0.1/public/messenger-2/web/app_dev.php/css/99d6e1c_bootstrap_1.css","method":"GET"}
[]

error with TimeZoneTransforme when running symfony2 on php 5.3 server

We are trying to deploy a symfony2 Web App in a shared hosting service offered by the University. The server has php 5.3. and we can only access it via FTP.
When I go to .../web/app.php I got an "503 Service Unavailable" message. When looking at the errors.log file I found:
GMT or UTC is not supported as a formatting output. Please install the "intl" extension for full localization capabilities.' in /var/www/vhosts/transmediacatalonia.uab.cat/httpdocs/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php:35
mod_fcgid: stderr: Stack trace:
mod_fcgid: stderr: #0 /var/www/.../DateFormat/FullTransformer.php(123): Symfony\\Component\\Intl\\DateFormatter\\DateFormat
\\TimeZoneTransformer->format(Object(DateTime), 1)
mod_fcgid: stderr: #1 /var/www/.../FullTransformer.php(96): Symfony\\Component\\Intl\\DateFormatter\\DateFormat\\FullTransformer->formatReplace('z', Object(DateTime))
mod_fcgid: stderr: #2 [internal function]: Symfony\\Component\\Intl\\DateFormatter\\DateFormat\\{closure}(Array)
mod_fcgid: stderr: #3 /var/ww in /var/www/.../Template.php on line 396
I understand the intnextension is required. The problem is that we have no way to install anything in the server.
Is there any way to solve this problem??
Thanks a lot in advance!!

Resources