500 Error with Database Cache Enabled
-
Dear W3TC Team,
Thanks a lot for this awesome plugin that helped with my site speed a lot! But I am encountering a problem whereby 500 internal server error always appears whenever the database cache option is enabled.
Neither my .htaccess nor error log reflects anything helpful about this error, and it’s frustrating since database cache does accelerate the site quite a bit. May I know if similar issues have surfaced before and if there is any solution?
Thanks a lot in advance!
Cheers,
BL
-
Hello,
Please enable Debug mode: for Database Cache when enabled in Performance>General settings, and scroll down to Debug sub-box. After you enable it, save settings. Go to your website, reload it and inspect HTML. Scroll down to the bottom and there you will find a comment “Performance optimized by W3 Total Cache”. Share your results. Also if you have minify enabled please disable it in order for that comment to show.
Hey Marko,
Thank you for the prompt reply and the page source I could retrieve is pasted below.
<!–
Performance optimized by W3 Total Cache. Learn more: https://www.w3-edge.com/products/Object Caching 56/137 objects using disk
Page Caching using disk: enhanced (User is logged in)
Content Delivery Network via N/A
Database Caching using disk (Request-wide User is logged in)Db cache debug info:
Total queries: 49
Cached queries: 0
Total query time: 0.0680
SQL info:
# | Time (s) | Caching (Reject reason) | Status | Data size (b) | Group | Query
1 | 0.0019 | disabled (user.logged_in) | not cached | 0 | | SELECT option_value FROM wp_options WHERE option_name = ‘logged_in_key’ LIMIT 1
2 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT option_value FROM wp_options WHERE option_name = ‘logged_in_salt’ LIMIT 1
3 | 0.001 | disabled (user.logged_in) | not cached | 0 | | SHOW TABLES LIKE ‘wp_nextend2_section_storage’
4 | 0.0006 | disabled (user.logged_in) | not cached | 0 | | SELECTid
,referencekey
,value
,system
,editable
FROM wp_nextend2_section_storage WHEREapplication
= ‘system’ ANDsection
= ‘global’
5 | 0.0006 | disabled (user.logged_in) | not cached | 0 | | SELECTid
,referencekey
,value
,system
,editable
FROM wp_nextend2_section_storage WHEREapplication
= ‘system’ ANDsection
= ‘fonts’
6 | 0.0007 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_nextend2_section_storage WHEREapplication
= ‘smartslider’ ANDsection
= ‘settings’
7 | 0.0008 | disabled (user.logged_in) | not cached | 0 | | SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.ID = 20 AND wp_posts.post_type = ‘page’ ORDER BY wp_posts.post_date DESC
8 | 0.0009 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_posts WHERE ID = 278 LIMIT 1
9 | 0.0007 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_posts WHERE (post_type = ‘page’ AND post_status = ‘publish’) AND post_parent = 20 ORDER BY wp_posts.post_title ASC LIMIT 0,1
10 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE t.term_id = 2
11 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT tr.object_id FROM wp_term_relationships AS tr INNER JOIN wp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (‘nav_menu’) AND tt.term_id IN (‘2’) ORDER BY tr.object_id ASC
12 | 0.0012 | disabled (user.logged_in) | not cached | 0 | | SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.ID IN (32,34,35,249,253,256,276,288,289,290,294,336,351,352,353,470,883) AND wp_posts.post_type = ‘nav_menu_item’ AND ((wp_posts.post_status = ‘publish’)) ORDER BY wp_posts.menu_order ASC
13 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (253) ORDER BY meta_id ASC
14 | 0.0004 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (249) ORDER BY meta_id ASC
15 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (256) ORDER BY meta_id ASC
16 | 0.0004 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (289) ORDER BY meta_id ASC
17 | 0.0004 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (290) ORDER BY meta_id ASC
18 | 0.0004 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (288) ORDER BY meta_id ASC
19 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (276) ORDER BY meta_id ASC
20 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (294) ORDER BY meta_id ASC
21 | 0.0004 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (336) ORDER BY meta_id ASC
22 | 0.0004 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (353) ORDER BY meta_id ASC
23 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (352) ORDER BY meta_id ASC
24 | 0.0004 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (351) ORDER BY meta_id ASC
25 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (470) ORDER BY meta_id ASC
26 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (883) ORDER BY meta_id ASC
27 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (34) ORDER BY meta_id ASC
28 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (32) ORDER BY meta_id ASC
29 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (35) ORDER BY meta_id ASC
30 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (943) ORDER BY meta_id ASC
31 | 0.0004 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_posts WHERE ID = 943 LIMIT 1
32 | 0.0012 | disabled (user.logged_in) | not cached | 0 | | SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.ID IN (32,34,35,249,253,256,276,288,289,290,294,336,351,352,353,470,883) AND wp_posts.post_type = ‘nav_menu_item’ AND ((wp_posts.post_status = ‘publish’)) ORDER BY wp_posts.menu_order ASC
33 | 0.0006 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_nextend2_section_storage WHEREapplication
= ‘cache’ ANDsection
= ‘notweb/n2-ss-9’ ANDreferencekey
= ‘variations.manifest’
34 | 0.0003 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_nextend2_section_storage WHEREapplication
= ‘cache’ ANDsection
= ‘notweb/n2-ss-9’ ANDreferencekey
= ‘data.manifest’
35 | 0.0003 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_nextend2_section_storage WHEREapplication
= ‘cache’ ANDsection
= ‘notweb/n2-ss-9’ ANDreferencekey
= ‘slideren_US1.manifest’
36 | 0.0004 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_nextend2_smartslider3_sliders WHERE id = 9
37 | 0.0008 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_nextend2_smartslider3_slides WHERE slider = 9 AND published = 1 ORDER BY ordering
38 | 0.0208 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_nextend2_image_storage WHEREhash
= ‘852ebad036e1a09c086ed90e2793db6a’
39 | 0.0006 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_nextend2_image_storage WHEREhash
= ’12c35ceab7230517430c397fced5708b’
40 | 0.0006 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_nextend2_image_storage WHEREhash
= ‘6010f4d474c69e45143cf742fc78dace’
41 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_nextend2_image_storage WHEREhash
= ‘e619ba109202690c0cc30c0f2ae299e2’
42 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_nextend2_image_storage WHEREhash
= ‘4f28e3d791ee7b359336b6c469e19683’
43 | 0.0003 | disabled (user.logged_in) | not cached | 0 | | SELECT * FROM wp_nextend2_image_storage WHEREhash
= ’51bca4208d50603bf6bca420ea1e9a76′
44 | 0.0097 | disabled (user.logged_in) | not cached | 0 | | SELECTid
,referencekey
,value
,system
,editable
FROM wp_nextend2_section_storage WHEREapplication
= ‘cache’ ANDsection
= ‘notweb/n2-ss-9’ ANDreferencekey
= ‘data.manifest’
45 | 0.005 | disabled (user.logged_in) | not cached | 0 | | SELECTid
,referencekey
,value
,system
,editable
FROM wp_nextend2_section_storage WHEREapplication
= ‘cache’ ANDsection
= ‘notweb/n2-ss-9’ ANDreferencekey
= ‘variations.manifest’
46 | 0.0044 | disabled (user.logged_in) | not cached | 0 | | SELECTid
,referencekey
,value
,system
,editable
FROM wp_nextend2_section_storage WHEREapplication
= ‘cache’ ANDsection
= ‘notweb/n2-ss-9’ ANDreferencekey
= ‘slideren_US1.manifest’
47 | 0.0005 | disabled (user.logged_in) | not cached | 0 | | SELECTid
,referencekey
,value
,system
,editable
FROM wp_nextend2_section_storage WHEREapplication
= ‘cache’ ANDsection
= ‘notweb/n2-ss-9’ ANDreferencekey
= ‘slideren_US1’
48 | 0.0006 | disabled (user.logged_in) | not cached | 0 | | SELECT comment_approved, COUNT( * ) AS total
FROM wp_commentsGROUP BY comment_approved
49 | 0.0021 | disabled (user.logged_in) | not cached | 0 | | SELECT sliders.title, sliders.id, slides.thumbnail
FROM wp_nextend2_smartslider3_sliders AS sliders
LEFT JOIN wp_nextend2_smartslider3_slides AS slides ON slides.id = (SELECT id FROM wp_nextend2_smartslider3_slides WHERE slider = sliders.id AND published = 1 AND generator_id = 0 AND thumbnail NOT LIKE ” ORDER BY ordering DESC LIMIT 1)
ORDER BY time DESC LIMIT 10Served from: ybaolong.com @ 2019-02-02 21:36:56 by W3 Total Cache
–>Hello,
I see that the database cache method is Disk. You should try with any memory based caching like Memcached, otherwise, you should not use database caching as his website or server is not able to cope.Hey Marko,
Thank you for the updates and since Memcached isn’t available, I’ll leave the option disabled instead.
Cheers!
- The topic ‘500 Error with Database Cache Enabled’ is closed to new replies.