gateway error, probably associated to my database not set up correctly

Can you point to to some documentation that has step by step directions to set up a database correctly. I have siteground and unfortunately they are not mindful that to some even the basics are advanced LOL
This MySQL server has been running for 7 days, 4 hours, 17 minutes and 46 seconds. It started up on Jun 26, 2017 at 05:19 AM.

Traffic # ø per hour
Received 270.9 GiB 1.6 GiB
Sent 13.7 TiB 81.1 GiB
Total 13.9 TiB 82.7 GiB
Connections # ø per hour %
Max. concurrent connections 209 --- ---
Failed attempts 187 k 1,085.47 2.23%
Aborted 58.4 k 338.74 0.70%
Total 8,371 k 48.59 k 100.00%
I get a lot of traffic, none of it is human

  • Predrag Dubajic

    Hi Robert,

    Can you give us some more info about what exactly are you trying to configure in database?
    When you install WordPress it will create required database and there shouldn't be any additional steps required from you in order to set them up.

    I'm afraid that we can't help you much with server setup, we can try pointing you out in right direction if you can provide us some more info about the exact issue you are experiencing but this should be something your server provider should be able to assist you further with and it's strange that they are not willing to assist you with this :slight_frown:

    Best regards,

  • robert

    Thank you for answering my message and I will prompt my provider for assistance. I just logged in and took a look at my error logs:

    [Tue Jul 04 13:57:37.227687 2017] [access_compat:error] [pid 27162] [client] AH01797: client denied by server configuration: /home/chaoscry/public_html/wp-content/uploads/wp-defender/index.php, referer:
    [Tue Jul 04 13:57:37.224191 2017] [access_compat:error] [pid 28711] [client] AH01797: client denied by server configuration:

    /home/chaoscry/public_html/wp-content/plugins/wp-defender/changelog.txt, referer:
    [Tue Jul 04 13:57:25.136020 2017] [:notice] [pid 25440] [client] mod_hive matched URI (/home/chaoscry/public_html/wp-login.php) with match 2, referer:

    I noticed wp-defender was mentioned.

  • robert

    Hello Predrag,
    Thank you for clarification concerning the defender reports; I appreciate the good news.
    I have held off with contacting my provider after my last support ticket. I purposely purchased their "Go Geek" package because I am new to websites. I was around when personal computing began, I had a TRS 80: . At that time (39 years ago), you had to write your own programs. But I did not keep up with programming and I find that there is more to having . website; it has to be monitored and maintained. The website has been down due to timeouts:

    === TOP 10 of 29 (total) Slow Queries for the past 24 hours ==========
    1. Executed 5h 19m 39s ago for 11.989238 sec on Database --> chaoscry_wp307
    Date: 2017-06-27 14:53:35 Query_time: 11.989238 Rows_examined: 14972: Rows_sent 14972 Lock_time: 0.000136
    # Schema: chaoscry_wp307 Last_errno: 0 Killed: 0 SELECT wp4p_posts.* FROM wp4p_posts WHERE 1=1 AND wp4p_posts.post_type = 'wphb_minify_group' AND ((wp4p_posts.post_status = 'publish')) ORDER BY wp4p_posts.post_date DESC;
    2. Executed 7h 23m 35s ago for 6.5866 sec on Database --> chaoscry_wp307
    Date: 2017-06-27 12:49:39 Query_time: 6.586600 Rows_examined: 1: Rows_sent 1 Lock_time: 0.000042
    # Schema: chaoscry_wp307 Last_errno: 0 Killed: 0 SELECT post_name FROM wp4p_posts WHERE post_name = 'f1c0d5c72b6306af34b0195948002722-scripts-1381' AND post_type = 'wphb_minify_group' AND ID != 0 LIMIT 1;
    3. Executed 6h 3m 57s ago for 3.769929 sec on Database --> chaoscry_wp307
    Date: 2017-06-27 14:09:17 Query_time: 3.769929 Rows_examined: 1: Rows_sent 0 Lock_time: 0.000075
    # Schema: chaoscry_wp307 Last_errno: 0 Killed: 0 UPDATE wp4p_options SET option_value = 'a:1:{s:64:\"3d9979b1302d4f0e084c59a28e8670e75e30085fce47d2fe3d7a67835aaefe44\";a:21:{s:15:\"_insertion_time\";i:1498590553;s:24:\"_last_recur_dismiss_time\";i:0;s:12:\"_recurrences\";i:0;s:16:\"delay_until_time\";i:0;s:11:\"for_context\";s:13:\"network|admin\";s:8:\"for_page\";s:0:\"\";s:11:\"for_user_id\";i:0;s:2:\"id\";s:0:\"\";s:13:\"is_applicable\";s:0:\"\";s:14:\"is_dismissable\";b:0;s:13:\"is_persistent\";b:0;s:12:\"is_transient\";b:0;s:6:\"markup\";s:95:\"<p>WP Sharks Core updated successfully. You\'re now running v170623.59000.</p>\n\";s:15:\"not_for_context\";s:0:\"\";s:12:\"not_for_page\";s:0:\"\";s:11:\"push_to_top\";b:0;s:12:\"recurs_every\";i:0;s:12:\"recurs_times\";i:0;s:12:\"requires_cap\";s:16:\"activate_plugins\";s:5:\"style\";s:0:\"\";s:4:\"type\";s:7:\"success\";}}' WHERE option_name = 'wp_sharks_core_notices';
    4. Executed 12h 52m 44s ago for 3.215457 sec on Database --> chaoscry_wp307
    Date: 2017-06-27 07:20:30 Query_time: 3.215457 Rows_examined: 1: Rows_sent 1 Lock_time: 0.000038
    # Schema: chaoscry_wp307 Last_errno: 0 Killed: 0 SELECT post_name FROM wp4p_posts WHERE post_name = 'f1c0d5c72b6306af34b0195948002722-scripts-3887' AND post_type = 'wphb_minify_group' AND ID != 0 LIMIT 1;
    5. Executed 4h 8m 40s ago for 3.2065 sec on Database --> chaoscry_wp307
    Date: 2017-06-27 16:04:34 Query_time: 3.206500 Rows_examined: 1: Rows_sent 0 Lock_time: 0.050238
    # Schema: chaoscry_wp307 Last_errno: 0 Killed: 0 SELECT wp4p_posts.* FROM wp4p_posts WHERE 1=1 AND wp4p_posts.post_name = 'f1c0d5c72b6306af34b0195948002722-scripts' AND wp4p_posts.ID NOT IN (0) AND wp4p_posts.post_type IN ('post', 'page', 'attachment', 'donation', 'donor', 'funds') AND ((wp4p_posts.post_status = 'trash')) ORDER BY wp4p_posts.post_date DESC;

    So I have been trying to learn more about databases- so I do not heavily rely on providers; but my brain is strained (LOL). I am considering simply destroying that database and go on youtube and follow a tutorial step-by-step. Take care, and thank you for your time and help!

  • Adam Czajczyk

    Hello Robert,

    I hope you're having a nice day!

    In your initial message, you mentioned that you got a lot of traffic and none of it is human. That sounds like traffic coming from some bots to me, isn't it? I'm thinking that this might, at least partially, be a reason for such issues.

    My point is that even if the site is very well optimized, there's always a number of db queries that it has to perform upon each load (regardless whether it comes from humans or bots) and at the same time pretty much each host puts some limits on these db queries. Usually, there's a limit on a number of allowed concurrent queries as well as some limitation on a number of total queries that can be performed within a minute/hour/day etc.

    If there's a huge amount of "non-human" traffic, that might result in these limits being reached, therefore causing the db to get "clogged" (usually it means that db server software is going down for a while). My point is that it might also be worth to check server access logs and/or consult host about that traffic that you're getting. Blocking some IPs and/or "user-agent" strings - in older to filter out bots - might be helpful here :slight_smile:

    Best regards,

  • robert

    In addition, it appears I have a plugin problem:
    Hello Robert,

    Thank you for your reply.

    Before we move forward with the timeout issue on your site and the database report you have provided, testing your site it appears that this is showing a blank page at this time.
    I have temporarily deactivated the plugins to test by renaming the plugins folder and your site immediately worked. It appears that one of the plugins is causing the issue with your site display that I suggest to review the plugins and deactivate it one by one to find the culprit on your site.
    Once the site displays and if the issue with the timeout persists, please let us know and we will gladly assist you.
    Best regards,
    Jerome Uy
    Technical Support Team
    Thank you, the website was getting pinged so much as well as a plugin problem. Thank you, we should have the problem fixed-thanks again.

  • Predrag Dubajic

    Hi Robert,

    Glad to hear you're back online now :slight_smile:

    If your site is blank because on of the plugins that usually means that there's a fatal error going on somewhere.

    Can you enable debug log in your wp-config.php file (located in root WP folder) by replacing define('WP_DEBUG', false); with this code:

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);
    @ini_set( 'display_errors', 0 );

    Activate your plugins one by one and after your site stops loading ir should create debug.log file in your wp-content folder that could tell us what is going on.
    Can you please save it as .txt file and attach it here so we can check it out?

    Best regards,

  • robert

    Hello Predrag,
    Excellent Help! I have been up for a few days. I really need to start learning more through your Academy. I did not realize there was something called "staging." I only recently found out about a "Child Theme."
    I followed through on your directions, but I forgot to follow through once I was able to deactivate my plugins and one-by one I activated them. As far as I can tell, it was the CloudFlare plugin. Even though I am just now up, I did place the code and I will keep an eye on it. I would have responded sooner but I could not access anything-

    Thanks again,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.