PHP Warning
-
Hello, since a while I get a PHP warning, and I think it was just after WordPress update to 4.5:
[12-Apr-2016 22:27:14 UTC] PHP Warning: Error while sending QUERY packet. PID=24491 in xxx/wp-includes/wp-db.php on line 1803 [13-Apr-2016 22:27:58 UTC] PHP Warning: Error while sending QUERY packet. PID=16626 in xxxx/wp-includes/wp-db.php on line 1803 [14-Apr-2016 22:24:37 UTC] PHP Warning: Error while sending QUERY packet. PID=8890 in xxx/wp-includes/wp-db.php on line 1803 [15-Apr-2016 22:28:59 UTC] PHP Warning: Error while sending QUERY packet. PID=702 in xxx/wp-includes/wp-db.php on line 1803 [16-Apr-2016 22:27:02 UTC] PHP Warning: Error while sending QUERY packet. PID=25025 in xxx/wp-includes/wp-db.php on line 1803 [17-Apr-2016 22:30:31 UTC] PHP Warning: Error while sending QUERY packet. PID=17226 in /xxx/wp-includes/wp-db.php on line 1803Could this be related to backup plugin? The hour is just about the same as the backup time.
-
Disabling the option didn’t work:
[23-Apr-2016 07:25:00 UTC] PHP Warning: Error while sending QUERY packet. PID=32529 in /xxx/public_html/wp-includes/wp-db.php on line 1803[2016/04/23 09:12:20] Scheduled ASAP backup in 60 seconds. [2016/04/23 09:16:59] Beginning Backup [2016/04/23 09:16:59] ZipArchive found and will be used for backups. [2016/04/23 09:16:59] Calculating backup size... [2016/04/23 09:17:01] 930 MB of diskspace will be processed. [2016/04/23 09:17:04] 51339 files added to backup list. [2016/04/23 09:17:04] wp-config.php added to backup list. [2016/04/23 09:17:04] A copy of .htaccess has been added to backup list. [2016/04/23 09:17:05] SQL file created: /xxx/wp-content/upgrade/05610310ab894ee255a54fde38da5f0d-dreamobjects-backup.sql (63 MB) ... [2016/04/23 09:17:05] SQL added to backup list. [2016/04/23 09:17:05] Creating zip file using ZipArchive. [2016/04/23 09:17:05] NOTICE: If the log stops here, PHP failed to create a zip of your wp-content folder. Please consider increasing the server's PHP memory, RAM or CPU. [2016/04/23 09:21:55] Calculating zip file size ... [2016/04/23 09:21:55] Zip file created: www.infolotnicze.pl/2016-04-23-091659.zip (802 MB) ... [2016/04/23 09:21:55] Deleting SQL file: /xxx/public_html/wp-content/upgrade/05610310ab894ee255a54fde38da5f0d-dreamobjects-backup.sql [2016/04/23 09:21:55] Beginning upload to DreamObjects servers. [2016/04/23 09:21:55] File size is over 100megs, using Multipart uploader. [2016/04/23 09:21:55] Prepare the upload parameters and upload parts in 25M chunks. [2016/04/23 09:21:56] Beginning upload to the cloud. This may take a while (5 minutes for every 75 megs or so). [2016/04/23 09:22:13] Part 1 uploaded ... [2016/04/23 09:22:13] Part 2 uploaded ... [2016/04/23 09:22:13] Part 3 uploaded ... [2016/04/23 09:22:28] Part 4 uploaded ... [2016/04/23 09:22:28] Part 5 uploaded ... [2016/04/23 09:22:28] Part 6 uploaded ... [2016/04/23 09:22:44] Part 7 uploaded ... [2016/04/23 09:22:44] Part 8 uploaded ... [2016/04/23 09:22:44] Part 9 uploaded ... [2016/04/23 09:22:59] Part 10 uploaded ... [2016/04/23 09:22:59] Part 11 uploaded ... [2016/04/23 09:22:59] Part 12 uploaded ... [2016/04/23 09:23:19] Part 13 uploaded ... [2016/04/23 09:23:19] Part 14 uploaded ... [2016/04/23 09:23:19] Part 15 uploaded ... [2016/04/23 09:23:35] Part 16 uploaded ... [2016/04/23 09:23:35] Part 17 uploaded ... [2016/04/23 09:23:35] Part 18 uploaded ... [2016/04/23 09:23:50] Part 19 uploaded ... [2016/04/23 09:23:50] Part 20 uploaded ... [2016/04/23 09:23:50] Part 21 uploaded ... [2016/04/23 09:24:08] Part 22 uploaded ... [2016/04/23 09:24:08] Part 23 uploaded ... [2016/04/23 09:24:08] Part 24 uploaded ... [2016/04/23 09:24:24] Part 25 uploaded ... [2016/04/23 09:24:24] Part 26 uploaded ... [2016/04/23 09:24:24] Part 27 uploaded ... [2016/04/23 09:24:39] Part 28 uploaded ... [2016/04/23 09:24:39] Part 29 uploaded ... [2016/04/23 09:24:39] Part 30 uploaded ... [2016/04/23 09:24:59] Part 31 uploaded ... [2016/04/23 09:24:59] Part 32 uploaded ... [2016/04/23 09:24:59] Part 33 uploaded ... [2016/04/23 09:24:59] SUCCESS: Upload to the cloud complete! [2016/04/23 09:24:59] Deleting zip file: /xxx/public_html/wp-content/upgrade/05610310ab894ee255a54fde38da5f0d-dreamobject-backup.zip [2016/04/23 09:24:59] Checking for backups to be deleted from the cloud. [2016/04/23 09:25:00] Removed backup www.infolotnicze.pl/2016-03-30-001153.zip from the cloud, per user retention choice [2016/04/23 09:25:00] Backup Complete. [2016/04/23 09:25:00]Okay, so good/bad.
Good: It doesn’t appear to be my changes from adding logging to the DB (you should have a new table that does that you see which is why you get the new dashboard).
Bad: I’m not calling the DB at that moment if you’ve disabled that call.
[2016/04/23 09:24:59] SUCCESS: Upload to the cloud complete!When that happens, the next step is to push the same comment to the DB.
[23-Apr-2016 07:25:00 UTC] PHP Warning: Error while sending QUERY packet. PID=32529 in /xxx/public_html/wp-includes/wp-db.php on line 1803Now it’s happening a second later, which is within the realm of possibility but still very very odd.
Does BulletProof Security Pro do any logging?
BPS Pro takes care of logging the errors so it is responsible for showing them in the dashboard.
[2016/04/25 08:06:53] Part 32 uploaded ... [2016/04/25 08:06:53] Part 33 uploaded ... [2016/04/25 08:06:53] SUCCESS: Upload to the cloud complete! [2016/04/25 08:06:53] Deleting zip file: /xxx/wp-content/upgrade/07b460ed3209194121ba03bdfbe5e3ea-dreamobject-backup.zip [2016/04/25 08:06:53] Checking for backups to be deleted from the cloud. [2016/04/25 08:06:54] Removed backup www.infolotnicze.pl/2016-04-01-003120.zip from the cloud, per user retention choice [2016/04/25 08:06:54] Backup Complete. [2016/04/25 08:06:54][25-Apr-2016 06:06:54 UTC] PHP Warning: Error while sending QUERY packet. PID=17590 in /xxx/wp-includes/wp-db.php on line 1803You don’t need to keep showing me that it happens.
I honestly don’t know WHY it’s happening, though. Logic dictates that if it’s DOBackups, then it would happen regardless of if you’re doing a large or small backup. All it does is send a rather short ‘Log this result to the database’ message with the same content as you see in the log.
Do you know how many simultanious connections are allowed to your DB?
Don’t take my showing offensive – I just wanted to show the time stamps for the next error as the previous was somehow different 😉
max_user_connections (Your Account): 0
max_connections (Server): 50
connect_timeout: 15It wasn’t offensive, it was just spammy and we get the point now 🙂
max_user_connections (Your Account): 0Sorry. Max of ZERO users for sql!?
@mika – infolotnicze asked me to take a look at this thread. I am pretty sure max_user_connections (Your Account): 0 is an InnoDB thing and 0 actually means “no limit”.
https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_user_connectionsCommand-Line Format –max_user_connections=#
System Variable Name max_user_connections
Variable Scope Global, Session
Dynamic Variable Yes
Permitted Values Type integer
Default 0
Min Value 0
Max Value 4294967295
The maximum number of simultaneous connections permitted to any given MySQL user account. A value of 0 (the default) means “no limit.”Is it the same on Maria? I haven’t extensively played with it yet.
I’m honestly stumped since the plugin only writes to the DB if that secret option is set to disabled, which infolonicze said he did right.
Even if he didn’t, it’s one small line. It’s literally the same output as in the debug log – only the success line. The other db work was done minutes prior, when the plugin does a db export, and that works without error.
I know pretty much nothing about MariaDB and would have to google that. 😉 Yeah this issue looks complicated/complex and I do not see anything obvious about what is going on either. I should have some spare time in 2-3 days so I will see if I can figure this one out since he uses my premium plugin and I have/can login to his site.
Yep, looks like MariaDB also uses 0 as the default variable setting for max_user_connections and it also means – no per-user limit.
https://mariadb.com/kb/en/mariadb/server-system-variables/#max_user_connections
max_user_connections
Description: Maximum simultaneous connections permitted for a user account. If set to 0, the default, there is no per-user limit. The session value is read-only and takes the global value unless there’s a nonzero MAX_USER_CONNECTIONS value for the user. Previously having a minimum value of 0, from MariaDB 5.3, max_user_connections can be set to -1 to stop users from connecting to the server. The global max_user_connections variable does not affect users with the SUPER privilege.
Commandline: –max-user-connections=#
Scope: Global, Session
Dynamic: Yes
Data Type: numeric
Default Value: 0
Range: -1 to 4294967295I think this is the right direction to be looking in: max_allowed_packet: http://stackoverflow.com/questions/30753674/error-while-sending-query-packet
A way to test if this is what is going on would be to do a DB Backup of only 1 of your small Database tables. Then if that works you want to look at the size of all of DB Tables to find which one (or ones) is exceeding the max_allowed_packet size. Then based on the logic that an intermediate string is exceeding the max_allowed_packet limit then you could test doing a backup of an extremely large database table, but it could be a cumulative thing depending on how DreamObjects Backups is handling/processing the strings during dump creation. So testing might require finding “the limit”. ie backup X number of DB tables, then Y number of DB tables, then Z number of DB tables, etc.
Just for reference:
https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_allowed_packetmax_allowed_packet
The maximum size of one packet or any generated/intermediate string.BPS Pro DB tool stuff:
You can check the max_allowed_packet and wait_timeout variable settings in BPS Pro > DB Monitor > DB Status & Info > SHOW SESSION VARIABLES button > max_allowed_packet: 33554432 and wait_timeout: 60You can check data and sizes of all of your DB tables by using: BPS Pro > DB Monitor > DB Status & Info > SHOW TABLE STATUS|SIZE button >
Table Name: xxxxx_bp_activity Table Size: 4.30 MB / 4,401 KB Engine: MyISAM Version: 10 Row Format: Dynamic Rows: 3100 Avg Row Length: 1287 Data Length: 4002528 Max Data Length: 281474976710655 Index Length: 503808 Data Free: 10912 Auto Increment: 22650 Create Time: 2015-09-30 15:20:05 Update Time: 2016-04-28 17:44:07 Check Time: 2015-09-30 15:20:05 Collation: utf8_general_ci Checksum: Create Options: Comment:@mika – how should I run the tests shown by AITPro?
Since a few days there is a change in the error:
[04-May-2016 06:02:17 UTC] PHP Warning: Error while sending QUERY packet. PID=19285 in xxxxx/public_html/wp-includes/wp-db.php on line 1811line 1811
previously it was 1803
So testing might require finding “the limit”. ie backup X number of DB tables, then Y number of DB tables, then Z number of DB tables, etc.
That’s not actually when the error shows up. And this is the problem.
The backup creates a SQL table and does not upload it to another database. At that moment, the create of the backup, there is no more interaction with the DB except the bit where it writes the results to the DB and you already disabled that.
Also the DB generation isn’t really doing a query like that. It’s executing a mysqldump, which doesn’t call wp-db.php at all. Plus it did that back in this step:
[2016/04/23 09:17:05] SQL file created: /xxx/wp-content/upgrade/05610310ab894ee255a54fde38da5f0d-dreamobjects-backup.sql (63 MB) ...Your error (knowing WP is +2 hours) is almost 10 min later:
[23-Apr-2016 07:25:00 UTC] PHP Warning: Error while sending QUERY packet. PID=32529 in /xxx/public_html/wp-includes/wp-db.php on line 1803Which… If we knew what the heck that PID was, we’d know.
ETA: Also we already know you DON’T get an error if you do the SQL only backup!
I believe the PID changes regularly, but you are on the right track which is to look in the server’s mysql_error.log file.
http://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_pid-file
Typical location is: pid-file=/var/lib/mysql/mysqld.pidOn XAMPP this is what I see for the PID for today (4136), yesterday the PID was different (4376) and the PID changes every day that I boot MySQL (4348, 6484, etc).
2016-05-04 07:35:07 4136 [Note] Plugin 'FEDERATED' is disabled. 2016-05-04 07:35:07 e04 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator. 2016-05-04 07:35:07 4136 [Note] InnoDB: Using atomics to ref count buffer pool pages 2016-05-04 07:35:07 4136 [Note] InnoDB: The InnoDB memory heap is disabled 2016-05-04 07:35:07 4136 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2016-05-04 07:35:07 4136 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-05-04 07:35:07 4136 [Note] InnoDB: Not using CPU crc32 instructions 2016-05-04 07:35:07 4136 [Note] InnoDB: Initializing buffer pool, size = 16.0M 2016-05-04 07:35:07 4136 [Note] InnoDB: Completed initialization of buffer pool 2016-05-04 07:35:07 4136 [Note] InnoDB: Highest supported file format is Barracuda. 2016-05-04 07:35:07 4136 [Note] InnoDB: The log sequence numbers 1625987 and 1625987 in ibdata files do not match the log sequence number 1943979241 in the ib_logfiles! 2016-05-04 07:35:07 4136 [Note] InnoDB: Database was not shutdown normally! 2016-05-04 07:35:07 4136 [Note] InnoDB: Starting crash recovery. 2016-05-04 07:35:07 4136 [Note] InnoDB: Reading tablespace information from the .ibd files... 2016-05-04 07:35:08 4136 [Note] InnoDB: Restoring possible half-written data pages 2016-05-04 07:35:08 4136 [Note] InnoDB: from the doublewrite buffer... 2016-05-04 07:35:09 4136 [Note] InnoDB: 128 rollback segment(s) are active. 2016-05-04 07:35:09 4136 [Note] InnoDB: Waiting for purge to start 2016-05-04 07:35:09 4136 [Note] InnoDB: 5.6.16 started; log sequence number 1943979241 2016-05-04 07:35:09 4136 [Note] Server hostname (bind-address): '*'; port: 3306 2016-05-04 07:35:09 4136 [Note] IPv6 is available. 2016-05-04 07:35:09 4136 [Note] - '::' resolves to '::'; 2016-05-04 07:35:09 4136 [Note] Server socket created on IP: '::'. 2016-05-04 07:35:09 4136 [Note] Event Scheduler: Loaded 0 events 2016-05-04 07:35:09 4136 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections. Version: '5.6.16' socket: '' port: 3306 MySQL Community Server (GPL)MariaDB and MySQL are essentially the same DB type. MariaDB is modeled after the MySQL DB structure and functionality and focuses on speed performance, but essentially they are pretty identical as far as the Core goes.
The topic ‘PHP Warning’ is closed to new replies.