I think i found an issue when calling:
ThreeWP_Broadcast()->api()->low_priority()->broadcast_children( $post_id, $broadcast_to_sites );
this is in a handler for ‘savepost’ that will broadcast a post to zero or more sites based on some data in the post.
When in the WP admin area, publishing one post works ok. Publishing 5 posts resulted in some issues.
I added some simple logging to the compress() method in /queue/data.php
$new_data = serialize( $data );
error_log( print_r( 'compress() serialized length:' . strlen( $new_data ), true ) );
$new_data = gzcompress( $new_data , 9 );
error_log( print_r( 'compress() gzcompress length:' . strlen( $new_data ), true ) );
$new_data = base64_encode( $new_data );
error_log( print_r( 'compress() base64_encode length:' . strlen( $new_data ), true ) );
return $this->set_data( $new_data );
the publishing of 5 posts resulted in:
[04-Jun-2022 02:54:32 UTC] compress() serialized length:<strong>5530723</strong>
[04-Jun-2022 02:54:32 UTC] compress() gzcompress length:304696
[04-Jun-2022 02:54:32 UTC] compress() base64_encode length:406264
[04-Jun-2022 02:54:32 UTC] compress() serialized length:<strong>8167436</strong>
[04-Jun-2022 02:54:32 UTC] compress() gzcompress length:1045420
[04-Jun-2022 02:54:32 UTC] compress() base64_encode length:1393896
[04-Jun-2022 02:54:32 UTC] compress() serialized length:<strong>13030598</strong>
[04-Jun-2022 02:54:32 UTC] compress() gzcompress length:3463590
[04-Jun-2022 02:54:32 UTC] compress() base64_encode length:4618120
[04-Jun-2022 02:54:33 UTC] WordPress database error MySQL server has gone away ...
[04-Jun-2022 02:54:33 UTC] compress() serialized length:<strong>31641989</strong>
[04-Jun-2022 02:54:34 UTC] compress() gzcompress length:15786512
[04-Jun-2022 02:54:34 UTC] compress() base64_encode length:21048684
[04-Jun-2022 02:54:34 UTC] WordPress database error MySQL server has gone away ...
[04-Jun-2022 02:54:34 UTC] compress() serialized length:<strong>110506248</strong>
[04-Jun-2022 02:54:38 UTC] compress() gzcompress length:71923059
[04-Jun-2022 02:54:38 UTC] compress() base64_encode length:95897412
[04-Jun-2022 02:54:40 UTC] WordPress database error MySQL server has gone away ...
looks like some variable is not getting cleared, but rather appended to when multiple items are published in bulk.
TIA for your help!