This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 5 replies, has 3 voices.

Last updated by Jamal 4 months, 2 weeks ago.

Assigned support staff: Jamal.

Author Posts
May 24, 2019 at 8:13 am

soterisC

For some days i am facing an 500 internal server error/ Database Error if i browse for a while in itour.com.cy or if i open multiple pages at the same time.

I notice that this problem is done only when the WPML or WooCommerce Multilingual is activated.

Link to a page where the issue can be seen: itour.com.cy

Bellow are the images when the WPML is activated (img1 and img2). You can see from img1 than a lot of tabs have Database error

And in img3 is when the WMPL is not activated which it shows that all websites open ok without errror.

I have tried a fresh install of wordpress with new Database and then restore back but it didnt work

Can you please help me because i can not figure on my own how i can fix this

May 24, 2019 at 10:46 am #3883677

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

Let us try it like this - please enable the WordPress debug log. This will allow us to see if any PHP errors are being produced.

1. Edit wp-config.php and insert the following lines:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

2. Reproduce the issue - so force your site to go into error 500.

3. Locate the debug log in: /wp-content/debug.log

4. Paste the latest lines here. No need to paste the entire log file, just 50 lines or so will do. Please censor any sensitive information.

https://codex.wordpress.org/Debugging_in_WordPress

Regards,
Bruno Kos

May 24, 2019 at 11:38 am #3884363

soterisC

Thank you for your reply

[~/public_html/wp-content]# tail -n 50 debug.log

[24-May-2019 11:34:21 UTC] PHP Warning: mysqli_query(): MySQL server has gone away in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:21 UTC] PHP Warning: mysqli_query(): Error reading result set's header in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:21 UTC] PHP Warning: Error while sending QUERY packet. PID=19219 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:21 UTC] PHP Warning: Empty row packet body in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:21 UTC] PHP Warning: mysqli_query(): (00000/0): in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007

[24-May-2019 11:34:23 UTC] PHP Warning: Error while sending QUERY packet. PID=19220 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:23 UTC] PHP Warning: Error while sending QUERY packet. PID=19164 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:23 UTC] PHP Warning: Error while sending QUERY packet. PID=19145 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:23 UTC] PHP Warning: Error while sending QUERY packet. PID=19214 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:23 UTC] PHP Warning: Error while sending QUERY packet. PID=19163 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:24 UTC] PHP Warning: Error while sending QUERY packet. PID=19212 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:24 UTC] PHP Warning: Error while sending QUERY packet. PID=19171 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:24 UTC] PHP Warning: Error while sending QUERY packet. PID=19101 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:24 UTC] PHP Warning: Error while sending QUERY packet. PID=19161 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:24 UTC] PHP Warning: Error while sending QUERY packet. PID=19155 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:24 UTC] PHP Warning: Error while sending QUERY packet. PID=19157 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:23 UTC] PHP Warning: Error while sending QUERY packet. PID=19205 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:23 UTC] PHP Warning: Error while sending QUERY packet. PID=19175 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:23 UTC] PHP Warning: Error while sending QUERY packet. PID=19168 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:29 UTC] PHP Warning: Error while sending QUERY packet. PID=19116 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:30 UTC] PHP Warning: Error while sending QUERY packet. PID=19114 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:33 UTC] PHP Warning: Error while sending QUERY packet. PID=19113 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:33 UTC] PHP Warning: Error while sending QUERY packet. PID=19109 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:33 UTC] PHP Warning: Error while sending QUERY packet. PID=19141 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:34:54 UTC] PHP Warning: Error while sending QUERY packet. PID=19115 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007
[24-May-2019 11:35:01 UTC] PHP Warning: Error while sending QUERY packet. PID=19100 in /home/itourcom/public_html/wp-includes/wp-db.php on line 2007

May 24, 2019 at 12:42 pm #3884797

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

I think we may need to introduce this to your hosting - can you check what their server logs say about this? Can you reach their support and send the info we gathered? I am checking this as a possible solution:
https://stackoverflow.com/a/30754157/1587045

This explains why this may be happening - most like the server has limits on how much data can it receive in one take.

Regards,
Bruno Kos

May 28, 2019 at 2:05 pm #3907803

soterisC

Thanks for the reply. I speak with hosting support and they replied the bellow:
Additionally, we can increase your max_allowed_packet size for you as WPML support advized, but we will need to know what you want it set to. Currently it is set to 268435456 bytes.

what value should i tell them? 524288000?

May 29, 2019 at 12:51 pm #3915581

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Bruno won't be working for the week, if you don't mine, I'll continue with you on this ticket.

It is hard to tell which value to set exactly, it will depend on the size of your database and the performances of your website. I suggest you double the current value. If it does not resolve the issue double it again.

Let me know what you will get.

Best regards,
Jamal

The topic ‘[Closed] Database Error/ 500 Internal Server error’ is closed to new replies.