Title: Database table problems causing 502 Error
Last modified: November 16, 2020

---

# Database table problems causing 502 Error

 *  [dunedude](https://wordpress.org/support/users/dunedude/)
 * (@dunedude)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/database-table-problems-causing-502-error/)
 * Twice today, the nginx server reported a 502 error with a “Bad Gateway”. In both
   cases, I stopped and restarted the services to temporarily fix the problem. In
   the second time, I was able to access the main page but the 502 error returned
   when trying to access <base url>/wp-admin.
 * The system then reported a database table issue and asked me to allow it to try
   and automate its own repair. Here is the output from that attempt:
 * The wpkc_users table is okay.
 * The wpkc_usermeta table is not okay. It is reporting the following error: 1 client
   is using or hasn’t closed the table properly. WordPress will attempt to repair
   this table…
    Failed to repair the wpkc_usermeta table. Error: 1 client is using
   or hasn’t closed the table properly
 * The wpkc_posts table is not okay. It is reporting the following error: 1 client
   is using or hasn’t closed the table properly. WordPress will attempt to repair
   this table…
    Failed to repair the wpkc_posts table. Error: 1 client is using 
   or hasn’t closed the table properly
 * The wpkc_comments table is not okay. It is reporting the following error: 1 client
   is using or hasn’t closed the table properly. WordPress will attempt to repair
   this table…
    Failed to repair the wpkc_comments table. Error: 1 client is using
   or hasn’t closed the table properly
 * The wpkc_links table is okay.
 * The wpkc_options table is not okay. It is reporting the following error: Table
   is marked as crashed. WordPress will attempt to repair this table…
    Failed to
   repair the wpkc_options table. Error: Table is marked as crashed
 * The wpkc_postmeta table is not okay. It is reporting the following error: 2 clients
   are using or haven’t closed the table properly. WordPress will attempt to repair
   this table…
    Failed to repair the wpkc_postmeta table. Error: 2 clients are using
   or haven’t closed the table properly
 * The wpkc_terms table is not okay. It is reporting the following error: 1 client
   is using or hasn’t closed the table properly. WordPress will attempt to repair
   this table…
    Failed to repair the wpkc_terms table. Error: 1 client is using 
   or hasn’t closed the table properly
 * The wpkc_term_taxonomy table is not okay. It is reporting the following error:
   1 client is using or hasn’t closed the table properly. WordPress will attempt
   to repair this table…
    Failed to repair the wpkc_term_taxonomy table. Error: 
   1 client is using or hasn’t closed the table properly
 * The wpkc_term_relationships table is not okay. It is reporting the following 
   error: 1 client is using or hasn’t closed the table properly. WordPress will 
   attempt to repair this table…
    Failed to repair the wpkc_term_relationships table.
   Error: 1 client is using or hasn’t closed the table properly
 * The wpkc_termmeta table is okay.
 * The wpkc_commentmeta table is not okay. It is reporting the following error: 
   1 client is using or hasn’t closed the table properly. WordPress will attempt
   to repair this table…
    Failed to repair the wpkc_commentmeta table. Error: 1 
   client is using or hasn’t closed the table properly
 * Some database problems could not be repaired. Please copy-and-paste the following
   list of errors to the WordPress support forums to get additional assistance.
 * wpkc_usermeta: 1 client is using or hasn’t closed the table properly
    wpkc_posts:
   1 client is using or hasn’t closed the table properly wpkc_comments: 1 client
   is using or hasn’t closed the table properly wpkc_options: Table is marked as
   crashed wpkc_postmeta: 2 clients are using or haven’t closed the table properly
   wpkc_terms: 1 client is using or hasn’t closed the table properly wpkc_term_taxonomy:
   1 client is using or hasn’t closed the table properly wpkc_term_relationships:
   1 client is using or hasn’t closed the table properly wpkc_commentmeta: 1 client
   is using or hasn’t closed the table properly
 * ———————-
 * So, I’m asking for help on how to fix these problems.
 * Thanks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatabase-table-problems-causing-502-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘Database table problems causing 502 Error’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [dunedude](https://wordpress.org/support/users/dunedude/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/database-table-problems-causing-502-error/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
