Magento2 catalog:images:resize mysql - php

I am getting the following error upon running bin/magento catalog:images:resize
300/973 [========>-------------------] 30% 7 mins 100.0 MiB | /1/2/12033_1.jpg
Warning: Error while sending QUERY packet. PID=17518 in ./vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228
I am currently running Magento 2.3.0 on PHP 7.1
Does anybody have an advice?

you need to increase the max allow packet in /etc/my.cnf add:
max_allowed_packet=32M
you can further increase it.

Related

EasyApache 4 Frozen on Loading profiles

Cpanel - Centos 7.8
Update
Running dcrpm provides this error message:
2020-07-08 14:21:51,147 ERROR [rpmutil.kill_spinning_rpm_query_processes]: Found stale rpm process: (7042) /usr/bin/rpm -q --nodigest --nosignature --queryforma
2020-07-08 14:21:51,505 ERROR [dcrpm.run]: DB needs recovery
2020-07-08 14:21:55,982 WARNING [rpmutil.verify_tables]: Skipping table 'Obsolet ename', blacklisted
yum commands dont return anything and rebuilding the RPM database doesn't seem to change anything.
I seem to be having some issues with EasyApache 4 after loading a few PHP extensions on a custom profile. I can no longer load any of the profiles.
I am stuck on an infinite loop of Loading profiles ... & when trying to access PHP versions through MultiPHP manager Gathering PHP-FPM packages information ... again in an infinite loop. Not quite sure how I've screwed up this time.
All I wanted to do was enable Zip Archives. Is there a way to disable what was enabled without going through there? Or is there a way to remove that profile and the associated enabled extensions?
Apologies I am somewhat of a newbie to all of this so I have come to the community that has helped me endlessly as I learn webdesign and basic code
All I can see in the error log is:
*AH01630: client denied by server configuration: /home/X/public_html/php.ini**
More Information
After leaving it load for an hour or so this appeared:
*The YUM cache is incomplete. The system is updating the cache to repair the issue.*
*This operation can take a few minutes to complete (it is very network and disk i/o intensive). EasyApache 4 will be available as soon as possible ...*
The result of which after several hours was:
*YUM encountered errors outside of EasyApache 4. Log into the system via SSH to resolve them, or you can click the ‘Refresh’ button to rebuild the system‘s YUM cache.*
Note: One new plugin was also installed recently (Softaculous) which may have something to do with it as the manage plugin section also doesn't load ._.
Unfortunately it seems now that no yum commands are working. I did try to run the following with no result:
yum clean all
yum update
It appears the proverbial ship is sinking, I can't even access plugins now as i get the follow fatal error:
(XID gvtyx9) The system aborted the subprocess “/bin/rpm” (process ID “23078”) because it reached the timeout of 15 seconds. at /usr/local/cpanel/Cpanel/SafeRun/Object.pm line 546.
Cpanel::SafeRun::Object::die\_if\_error(Cpanel::SafeRun::Object=HASH(0x2a1a970)) called at /usr/local/cpanel/Cpanel/SafeRun/Object.pm line 538
Cpanel::SafeRun::Object::new\_or\_die("Cpanel::SafeRun::Object", "program", "/bin/rpm", "args", ARRAY(0x179bed0), "timeout", 15, "read\_timeout", ...) called at /usr/local/cpanel/Cpanel/GenSysInfo.pm line 264
Cpanel::GenSysInfo::\_run\_with\_timeout("/bin/rpm", "--query", "--nosignature", "--nodigest", "--queryformat", "%{NAME} %{VERSION}\\\\n", "--file", "/etc/redhat-release") called at /usr/local/cpanel/Cpanel/GenSysInfo.pm line 204
Cpanel::GenSysInfo::\_get\_rpm\_distro\_version\_arch() called at /usr/local/cpanel/Cpanel/GenSysInfo.pm line 124
Cpanel::GenSysInfo::\_get\_new\_conf(HASH(0x2148000)) called at /usr/local/cpanel/Cpanel/GenSysInfo.pm line 51
Cpanel::GenSysInfo::run() called at /usr/local/cpanel/Cpanel/GenSysInfo.pm line 71
Cpanel::GenSysInfo::get\_rpm\_distro\_version() called at /usr/local/cpanel/Cpanel/Plugins.pm line 181
Cpanel::Plugins::\_do\_url\_variable\_substitution("[http://httpupdate.cpanel.net/cpanel-plugins-c\\$cp\_centos\_major](http://httpupdate.cpanel.net/cpanel-plugins-c\$cp_centos_major)"...) called at /usr/local/cpanel/Cpanel/Plugins.pm line 158
Cpanel::Plugins::get\_baseurls() called at /usr/local/cpanel/Whostmgr/Addons/RPM/Cache.pm line 170
Whostmgr::Addons::RPM::Cache::\_yum\_modules() called at /usr/local/cpanel/Whostmgr/Addons/RPM/Cache.pm line 102
Whostmgr::Addons::RPM::Cache::\_LOAD\_FRESH("Whostmgr::Addons::RPM::Cache") called at /usr/local/cpanel/Cpanel/CacheFile.pm line 234
Cpanel::CacheFile::load("Whostmgr::Addons::RPM::Cache") called at /usr/local/cpanel/Whostmgr/Addons/RPM/Cache.pm line 91
Whostmgr::Addons::RPM::Cache::load("Whostmgr::Addons::RPM::Cache") called at /usr/local/cpanel/Whostmgr/Addons/RPM.pm line 62
Whostmgr::Addons::RPM::get\_modules() called at whostmgr/bin/whostmgr2.pl line 2531
main::manage\_plugins("manage\_plugins") called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 274
Whostmgr::Dispatch::\_do\_call("manage\_plugins", HASH(0x2145770), HASH(0x214a890)) called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 172
Whostmgr::Dispatch::dispatch("manage\_plugins", 1, ARRAY(0x2147af8), HASH(0x214a890)) called at whostmgr/bin/whostmgr2.pl line 773

yii2 migration command shows "Out of memory" error

When I call yii2 migrate command(from console). I always get "Out of memory" message. In regular case php do not show this error, but when migration command.
# ./yii migrate
Yii Migration Tool (based on Yii v2.0.13-dev)
Out of memory
However PHP through Apache works absolutely fine. It's just on the CLI that I get this error. The machine is running CentOS release 6 and PHP 5.6. System memory is 6GB, that is enough to run command.
total used free shared buffers cached
Mem: 5971 1557 4413 128 119 440
-/+ buffers/cache: 998 4973
Swap: 0 0 0
Add:
I witnessed laravel artisan command also show that error.
I could not know what occurs this error finally. But when I re-installed php library from base, the error disappeared. This may help for you.

Error while sending QUERY packet. Magento 2 (2.1.5)

I'm trying to install the Magento 2 (2.1.5) on web server with CLI. but its is giving error
[Exception]
Warning: Error while sending QUERY packet. PID=34 in
/home/cocaine/public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php
on line 228
I searched for the solution and all the solution is that increase the
max_allowed_packet
First max_allowed_packet was 33MB but now i increased it to 512MB. But it's still giving me same error with different PID.
CLI commands used to install Magento is
magento setup:install --base-url=http://www.example.com \
--db-host=localhost --db-name=db_name --db-user=db_admin --db-password=db_admin_password \
--admin-firstname=User --admin-lastname=Magento --admin-email=admin#demo.com \
--admin-user=admin_site --admin-password=admin_password --language=en_US \
--currency=INR --timezone=Asia/Kolkata --cleanup-database \
--session-save=db --use-rewrites=1
You need to increase wait_timeout and max_allowed_packet value from your database configuration.
increase wait_timeout = XX to wait_timeout=180
Also, Change at least max_allowed_packet = 512M

PHP can't connect to MYSQL after restart - Ubuntu 15.10

spent a few hours racking my brains, trying to fix this but I fear I'm not getting anywhere.
I set up localhost as a lamp environment yesterday on Ubuntu 15.10, everything was running fine and I made some good progress. Now I restart this morning and my project which I know I left working is now giving me
Fatal error: Call to undefined function mysqli_connect() in /var/www/html/includes/mysql.php on line 6
Now I know that there isn't a mistake in the code and mysql and apache is definately running.
elliot#elliotsLaptop:~$ mysqladmin -u root -p status
Enter password:
Uptime: 3588 Threads: 1 Questions: 19 Slow queries: 0 Opens: 69
Flush tables: 1 Open tables: 62 Queries per second avg: 0.005.
elliot#elliotsLaptop:~$ service apache2 status
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: active (running) since Wed 2016-04-20 09:02:18 BST; 1h 1min ago
Also I made no changed to the PHP.ini file when I originally set it up, but now both mysqli_connect and mysql_connect are both undefined functions and mysqli is an undefined class.
Fatal error: Class 'mysqli' not found in /var/www/html/includes/mysql.php on line 6
So it seems to be some kind of setting has change inside my php setup but I can't for the life of me figure out what it is.
This is PHP Version 5.6.11. Anyone have any experience with this kind of problem? I'm close to reinstalling PHP but I'd rather understand what is going on or what I may be doing wrong.
Any advice would be severly appreciated.
Try Below Command:
Latest phpMyAdmin versions require mysqli extension and will no longer work with mysql.
sudo apt-get install php5-mysql
Please add below line php.ini
extension=mysqli.so
Please restart server hope this works
For some reason, taking the mysql connection out of an include and putting it directly onto the page that was using it seems to have fixed the problem. I have no real idea why this would be the case but everything now seems to be working as expected.
Thanks a lot to everyone who tried to help me with this.

MySQL 5.6 takes long time to connect, even with the "MySQL 5.6 Command Line Client"

I have had MySQL 5.6.16 and was working perfect suddenly the MySQL connection become so slow to connect (20 - 21 seconds) I have removed it completely even with the data tables and downloaded and installed ver. 5.6.19 with a fresh and new installation, but this didn't fix the long time connection EVEN with the MySQL Command Line Client it takes 20 seconds to return the "mysql>".
Also any web-based php code with mysql query connection takes 20 sec to get the data page.
I also tried enabling skip_name_resolve / connect_timeout = 10 / wait_timeout = 50 but non of this did anything.
I have:
Windows 7 Home Premium SP1 x64
MySQL 5.6.19-enterprise-commercial-advanced
Apache 2.4.9 (Win64) OpenSSL 1.0.1f
PHP 5.5.10
MySQL Global Status: https://www.dropbox.com/s/gz44pvtomwbncog/MYSQL_GLOBAL_STATUS.txt
Thanks anyway, I have figured out that this issue because of the windows, I have used a repair tool: "Tweaking.com - Windows Repair" and it fixed this issue...

Categories