XF 1.3 An unexpected database error occurred. Please try again later.

rdn

Well-known member
I just check my forum 2 hours ago and I encounter this error all over the forum.
Checking pingdom logs show's my forum was already down for 6 to 8 hours.

What I did was restart the whole server right away, and fixed the error.

Now I started on debugging what was the root cause of the error.
I didn't think of viewing the page source of the error that might show's more info (my bad :( ).

The only changes I made yesterday was enable ngx_pagespeed which use my Memcached.
So I raise up my Memcached memory to 1024mb (thinking that maybe the cause of the problem).

Since I'm using Centminmod on my Dedicated server, viewing /var/log/mysqld.log show this:

This the latest content I have: http://pastebin.com/9GJJghvU

Reading the log files, looks like @Chris Deeming addon "xf_addon_update_check" one of the issue right there?
And also show's I'm lacking of buffer pool so I change it from 4GB to 5GB.


Any suggestion for my problem?
Thanks !


Summary of the changes I made that I think fix this problem:
  1. max_connections from 100 to 300
  2. memcached memory from 650mb to 1024mb
  3. innodb_buffer_poll_size from 4GB to 5GB
 
Last edited:
[ERROR] mysqld: Table './dbname/xf_addon_update_check' is marked as crashed and should be repaired
That would just need repairing in PHP My Admin. I wouldn't have thought a table crash is this fatal unless it's a side effect of something else that's gone wrong. That table is only ever queried periodically via a cron or when you visit a specific Admin CP page anyway.

I think you maybe answered your own question about what to do next. If you changed settings and set up new things yesterday, I would have thought undoing those things would be the first step.
 
  • Like
Reactions: rdn
A couple weeks ago I had the same error, but with different table. Mine is "xf_search_index"

The culprit is the server down for 5 minutes, so the service (mysql) is shutdown in a wrong way.

Repair the table fix the problem.
 
I think it's my ISP problem.
Gtmetrix's reports fine. :(
Some of the forum user's can't access my forum also.
I don't know what is blocking us.
I can access ssh fine, :/
Thanks Chris.
Debugging on this right now.
 
CSF can block IP's. Try to check it.
To be more correct... CSF DOES block IP's in it's default install if ssh attempts are made from that IP. ;)
There is other stuff it blocks by default also - but I primarily concentrate on the SSH and mail since those are two of the main services I have running (no FTP, etc).

If using the csf.blocklists it will also block based upon what you have enabled in there.

Code:
root@pegasus:/etc/csf# cat csf.deny
###############################################################################
# Copyright 2006-2014, Way to the Web Limited
# URL: http://www.configserver.com
# Email: sales@waytotheweb.com
###############################################################################
# The following IP addresses will be blocked in iptables
# One IP address per line
# CIDR addressing allowed with a quaded IP (e.g. 192.168.254.0/24)
# Only list IP addresses, not domain names (they will be ignored)
#
# Note: If you add the text "do not delete" to the comments of an entry then
# DENY_IP_LIMIT will ignore those entries and not remove them
#
# Advanced port+ip filtering allowed with the following format
# tcp/udp|in/out|s/d=port|s/d=ip
#
# See readme.txt for more information regarding advanced port filtering
#
61.144.43.235 # lfd: (sshd) Failed SSH login from 61.144.43.235 (CN/China/-): 5 in the last 3600 secs - Thu Jan 23 05:55:12 2014
175.99.95.240 # lfd: (sshd) Failed SSH login from 175.99.95.240 (TW/Taiwan/Tai-pei/Taipei/175-99-95-240.static.tfn.net.tw): 5 in the last 3600 secs - Thu Jan 23 13:21:00 2014
112.216.82.130 # lfd: (sshd) Failed SSH login from 112.216.82.130 (KR/Korea, Republic of/-/-/-): 5 in the last 3600 secs - Fri Jan 24 03:33:57 2014
112.133.195.50 # lfd: (sshd) Failed SSH login from 112.133.195.50 (IN/India/-/-/ws50-195-133-112.rcil.gov.in): 5 in the last 3600 secs - Fri Jan 24 20:31:31 2014
60.199.196.144 # lfd: (sshd) Failed SSH login from 60.199.196.144 (TW/Taiwan/Tai-pei/Taipei/60-199-196-144.static.tfn.net.tw): 5 in the last 3600 secs - Sat Jan 25 19:56:49 2014
89.136.195.142 # lfd: (sshd) Failed SSH login from 89.136.195.142 (RO/Romania/-/-/-): 5 in the last 3600 secs - Sun Jan 26 01:58:19 2014
36.39.246.121 # lfd: (sshd) Failed SSH login from 36.39.246.121 (KR/Korea, Republic of/Seoul-tukpyolsi/Seoul/-): 5 in the last 3600 secs - Sun Jan 26 22:34:45 2014
50.57.122.118 # lfd: (sshd) Failed SSH login from 50.57.122.118 (US/United States/Texas/San Antonio/50-57-122-118.static.cloud-ips.com): 5 in the last 3600 secs - Tue Jan 28 07:04:05 2014
137.135.73.44 # lfd: (sshd) Failed SSH login from 137.135.73.44 (US/United States/-/-/-): 5 in the last 3600 secs - Wed Jan 29 17:30:20 2014
203.248.143.169 # lfd: (sshd) Failed SSH login from 203.248.143.169 (KR/Korea, Republic of/-/-/-): 5 in the last 3600 secs - Thu Jan 30 11:30:32 2014
115.68.22.162 # lfd: (sshd) Failed SSH login from 115.68.22.162 (KR/Korea, Republic of/-/-/-): 5 in the last 3600 secs - Sat Feb  1 03:02:29 2014
98.158.29.93 # lfd: (sshd) Failed SSH login from 98.158.29.93 (US/United States/California/Santa Cruz/-): 5 in the last 3600 secs - Mon Feb  3 01:31:22 2014
172.245.211.219 # lfd: (sshd) Failed SSH login from 172.245.211.219 (US/United States/New York/Buffalo/.): 5 in the last 3600 secs - Mon Feb  3 04:00:54 2014
217.169.223.79 # lfd: (sshd) Failed SSH login from 217.169.223.79 (RS/Serbia/-/Beograd/-): 5 in the last 3600 secs - Tue Feb  4 08:58:27 2014
23.94.38.113 # lfd: (sshd) Failed SSH login from 23.94.38.113 (US/United States/New York/Buffalo/host.colocrossing.com): 5 in the last 3600 secs - Wed Feb  5 09:20:40 2014
23.253.90.170 # lfd: (sshd) Failed SSH login from 23.253.90.170 (US/United States/Texas/San Antonio/-): 5 in the last 3600 secs - Thu Feb  6 03:08:00 2014
199.71.214.66 # lfd: (sshd) Failed SSH login from 199.71.214.66 (US/United States/California/Walnut/happy.unixbsd.info): 5 in the last 3600 secs - Thu Feb  6 13:11:39 2014
85.114.141.163 # lfd: (sshd) Failed SSH login from 85.114.141.163 (DE/Germany/-/-/s163.silver.fastwebserver.de): 5 in the last 3600 secs - Fri Feb  7 13:56:42 2014
162.243.18.49 # lfd: (sshd) Failed SSH login from 162.243.18.49 (US/United States/-/-/-): 5 in the last 3600 secs - Fri Feb  7 14:51:37 2014
62.193.238.121 # lfd: (sshd) Failed SSH login from 62.193.238.121 (FR/France/Provence-Alpes-Cote dAzur/Amen/wpc2076.amenworld.com): 5 in the last 3600 secs - Fri Feb  7 18:43:22 2014
66.49.9.202 # lfd: (sshd) Failed SSH login from 66.49.9.202 (US/United States/Missouri/Liberty/66.49.9.202.nw.nuvox.net): 5 in the last 3600 secs - Fri Feb  7 21:15:28 2014
23.238.186.45 # lfd: (sshd) Failed SSH login from 23.238.186.45 (US/United States/California/Walnut/unassigned.psychz.net): 5 in the last 3600 secs - Sat Feb  8 15:05:59 2014
42.117.3.132 # lfd: (sshd) Failed SSH login from 42.117.3.132 (VN/Vietnam/Ha Noi/Hanoi/-): 5 in the last 3600 secs - Sat Feb  8 16:17:35 2014
62.215.212.45 # lfd: (sshd) Failed SSH login from 62.215.212.45 (KW/Kuwait/Al Kuwayt/Kuwait/-): 5 in the last 3600 secs - Sun Feb  9 07:01:13 2014
82.221.99.232 # lfd: (sshd) Failed SSH login from 82.221.99.232 (IS/Iceland/-/-/tor-exit.burratino.net): 5 in the last 3600 secs - Sun Feb  9 20:29:59 2014
 
Last edited:
  • Like
Reactions: rdn
To be more correct... CSF DOES block IP's in it's default install if ssh attempts are made from that IP. ;)
There is other stuff it blocks by default also - but I primarily concentrate on the SSH and mail since those are two of the main services I have running (no FTP, etc).

If using the csf.blocklists it will also block based upon what you have enabled in there.

Code:
root@pegasus:/etc/csf# cat csf.deny
###############################################################################
# Copyright 2006-2014, Way to the Web Limited
# URL: http://www.configserver.com
# Email: sales@waytotheweb.com
###############################################################################
# The following IP addresses will be blocked in iptables
# One IP address per line
# CIDR addressing allowed with a quaded IP (e.g. 192.168.254.0/24)
# Only list IP addresses, not domain names (they will be ignored)
#
# Note: If you add the text "do not delete" to the comments of an entry then
# DENY_IP_LIMIT will ignore those entries and not remove them
#
# Advanced port+ip filtering allowed with the following format
# tcp/udp|in/out|s/d=port|s/d=ip
#
# See readme.txt for more information regarding advanced port filtering
#
61.144.43.235 # lfd: (sshd) Failed SSH login from 61.144.43.235 (CN/China/-): 5 in the last 3600 secs - Thu Jan 23 05:55:12 2014
175.99.95.240 # lfd: (sshd) Failed SSH login from 175.99.95.240 (TW/Taiwan/Tai-pei/Taipei/175-99-95-240.static.tfn.net.tw): 5 in the last 3600 secs - Thu Jan 23 13:21:00 2014
112.216.82.130 # lfd: (sshd) Failed SSH login from 112.216.82.130 (KR/Korea, Republic of/-/-/-): 5 in the last 3600 secs - Fri Jan 24 03:33:57 2014
112.133.195.50 # lfd: (sshd) Failed SSH login from 112.133.195.50 (IN/India/-/-/ws50-195-133-112.rcil.gov.in): 5 in the last 3600 secs - Fri Jan 24 20:31:31 2014
60.199.196.144 # lfd: (sshd) Failed SSH login from 60.199.196.144 (TW/Taiwan/Tai-pei/Taipei/60-199-196-144.static.tfn.net.tw): 5 in the last 3600 secs - Sat Jan 25 19:56:49 2014
89.136.195.142 # lfd: (sshd) Failed SSH login from 89.136.195.142 (RO/Romania/-/-/-): 5 in the last 3600 secs - Sun Jan 26 01:58:19 2014
36.39.246.121 # lfd: (sshd) Failed SSH login from 36.39.246.121 (KR/Korea, Republic of/Seoul-tukpyolsi/Seoul/-): 5 in the last 3600 secs - Sun Jan 26 22:34:45 2014
50.57.122.118 # lfd: (sshd) Failed SSH login from 50.57.122.118 (US/United States/Texas/San Antonio/50-57-122-118.static.cloud-ips.com): 5 in the last 3600 secs - Tue Jan 28 07:04:05 2014
137.135.73.44 # lfd: (sshd) Failed SSH login from 137.135.73.44 (US/United States/-/-/-): 5 in the last 3600 secs - Wed Jan 29 17:30:20 2014
203.248.143.169 # lfd: (sshd) Failed SSH login from 203.248.143.169 (KR/Korea, Republic of/-/-/-): 5 in the last 3600 secs - Thu Jan 30 11:30:32 2014
115.68.22.162 # lfd: (sshd) Failed SSH login from 115.68.22.162 (KR/Korea, Republic of/-/-/-): 5 in the last 3600 secs - Sat Feb  1 03:02:29 2014
98.158.29.93 # lfd: (sshd) Failed SSH login from 98.158.29.93 (US/United States/California/Santa Cruz/-): 5 in the last 3600 secs - Mon Feb  3 01:31:22 2014
172.245.211.219 # lfd: (sshd) Failed SSH login from 172.245.211.219 (US/United States/New York/Buffalo/.): 5 in the last 3600 secs - Mon Feb  3 04:00:54 2014
217.169.223.79 # lfd: (sshd) Failed SSH login from 217.169.223.79 (RS/Serbia/-/Beograd/-): 5 in the last 3600 secs - Tue Feb  4 08:58:27 2014
23.94.38.113 # lfd: (sshd) Failed SSH login from 23.94.38.113 (US/United States/New York/Buffalo/host.colocrossing.com): 5 in the last 3600 secs - Wed Feb  5 09:20:40 2014
23.253.90.170 # lfd: (sshd) Failed SSH login from 23.253.90.170 (US/United States/Texas/San Antonio/-): 5 in the last 3600 secs - Thu Feb  6 03:08:00 2014
199.71.214.66 # lfd: (sshd) Failed SSH login from 199.71.214.66 (US/United States/California/Walnut/happy.unixbsd.info): 5 in the last 3600 secs - Thu Feb  6 13:11:39 2014
85.114.141.163 # lfd: (sshd) Failed SSH login from 85.114.141.163 (DE/Germany/-/-/s163.silver.fastwebserver.de): 5 in the last 3600 secs - Fri Feb  7 13:56:42 2014
162.243.18.49 # lfd: (sshd) Failed SSH login from 162.243.18.49 (US/United States/-/-/-): 5 in the last 3600 secs - Fri Feb  7 14:51:37 2014
62.193.238.121 # lfd: (sshd) Failed SSH login from 62.193.238.121 (FR/France/Provence-Alpes-Cote dAzur/Amen/wpc2076.amenworld.com): 5 in the last 3600 secs - Fri Feb  7 18:43:22 2014
66.49.9.202 # lfd: (sshd) Failed SSH login from 66.49.9.202 (US/United States/Missouri/Liberty/66.49.9.202.nw.nuvox.net): 5 in the last 3600 secs - Fri Feb  7 21:15:28 2014
23.238.186.45 # lfd: (sshd) Failed SSH login from 23.238.186.45 (US/United States/California/Walnut/unassigned.psychz.net): 5 in the last 3600 secs - Sat Feb  8 15:05:59 2014
42.117.3.132 # lfd: (sshd) Failed SSH login from 42.117.3.132 (VN/Vietnam/Ha Noi/Hanoi/-): 5 in the last 3600 secs - Sat Feb  8 16:17:35 2014
62.215.212.45 # lfd: (sshd) Failed SSH login from 62.215.212.45 (KW/Kuwait/Al Kuwayt/Kuwait/-): 5 in the last 3600 secs - Sun Feb  9 07:01:13 2014
82.221.99.232 # lfd: (sshd) Failed SSH login from 82.221.99.232 (IS/Iceland/-/-/tor-exit.burratino.net): 5 in the last 3600 secs - Sun Feb  9 20:29:59 2014
If those are the number of blocks generated by SSHD, I'd swap the port to something random and stop them even hitting the daemon.
 
If those are the number of blocks generated by SSHD, I'd swap the port to something random and stop them even hitting the daemon.
I'm not really worried about them hitting the port. It just adds to my block list (which I use on my other servers also if they aren't already listed there). :p
 
Back
Top Bottom