Hi, I have a lot of logs with deadlocks.... ed Sep 25 15:05:44 2013 : Error: [sql] Couldn't update SQL accounting ALIVE record - Deadlock found when trying to get lock; try restarting transaction Wed Sep 25 15:05:44 2013 : Error: [sql] Couldn't update SQL accounting ALIVE record - Deadlock found when trying to get lock; try restarting transaction Wed Sep 25 15:05:44 2013 : Error: [sql] Couldn't update SQL accounting ALIVE record - Deadlock found when trying to get lock; try restarting transaction Wed Sep 25 15:05:44 2013 : Error: [sql] Couldn't update SQL accounting ALIVE record - Deadlock found when trying to get lock; try restarting transaction Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: Cannot store result Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: Cannot store result Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: MySQL error 'Deadlock found when trying to get lock; try restarting transaction' Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: MySQL error 'Deadlock found when trying to get lock; try restarting transaction' Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: Cannot store result Wed Sep 25 15:05:44 2013 : Error: [sql] Couldn't update SQL accounting ALIVE record - Deadlock found when trying to get lock; try restarting transaction Wed Sep 25 15:05:44 2013 : Error: [sql] Couldn't update SQL accounting ALIVE record - Deadlock found when trying to get lock; try restarting transaction Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: MySQL error 'Deadlock found when trying to get lock; try restarting transaction' Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: Cannot store result Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: MySQL error 'Deadlock found when trying to get lock; try restarting transaction' Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: Cannot store result Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: Cannot store result Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: MySQL error 'Deadlock found when trying to get lock; try restarting transaction' Wed Sep 25 15:05:44 2013 : Error: [sql] Couldn't update SQL accounting ALIVE record - Deadlock found when trying to get lock; try restarting transaction Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: Cannot store result Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: MySQL error 'Deadlock found when trying to get lock; try restarting transaction' Wed Sep 25 15:05:44 2013 : Error: [sql] Couldn't update SQL accounting ALIVE record - Deadlock found when trying to get lock; try restarting transaction Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: Cannot store result Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: MySQL error 'Deadlock found when trying to get lock; try restarting transaction' Wed Sep 25 15:05:44 2013 : Error: rlm_sql_mysql: MySQL error 'Deadlock found when trying to get lock; try restarting transaction'
This messages are from radius.log I've doesn't changed anything in db... and I haven't custom queries... 2013/9/25 Arran Cudbard-Bell <a.cudbardb@freeradius.org>
On 25 Sep 2013, at 20:08, Alisson <alissongoncalves@bsd.com.br> wrote:
Hi,
I have a lot of logs with deadlocks....
Those would be caused by a bug in your custom SQL queries?
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 25 Sep 2013, at 20:54, Alisson <alissongoncalves@bsd.com.br> wrote:
This messages are from radius.log
Those errors were generated by the MySQL client library or the MySQL server, just because they're included in the radius.log file does not mean they originated from within the FreeRADIUS code base.
I've doesn't changed anything in db... and I haven't custom queries...
Here is a post describing possible causes. I've never seen this with the stock queries and schema. http://stackoverflow.com/questions/2332768/how-to-avoid-mysql-deadlock-found... Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
So this error its caused by my application? 2013/9/25 Arran Cudbard-Bell <a.cudbardb@freeradius.org>
On 25 Sep 2013, at 20:54, Alisson <alissongoncalves@bsd.com.br> wrote:
This messages are from radius.log
Those errors were generated by the MySQL client library or the MySQL server, just because they're included in the radius.log file does not mean they originated from within the FreeRADIUS code base.
I've doesn't changed anything in db... and I haven't custom queries...
Here is a post describing possible causes. I've never seen this with the stock queries and schema.
http://stackoverflow.com/questions/2332768/how-to-avoid-mysql-deadlock-found...
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Thu, Sep 26, 2013 at 4:14 AM, Alisson <alissongoncalves@bsd.com.br>wrote:
So this error its caused by my application?
Whatever it is that creates queries to mysql. In the default schema, radacct will continue to grow. If you're running it on a production system with significant amount of user on a commodity hardware, you need to find some way to maintain the table in a reasonable size. For example, 10 million rows of radacct on a single-disk PC clearly spells trouble. The quickest way to "fix" that is by: - create a new table with same structure: CREATE TABLE ... LIKE ... , see mysql reference guide for details - rename radacct to something else, and rename the new table to radacct That way you'd get an empty radacct, but with old data still available to examine. For example, you might want to copy current month's acct data (for billing purposes) back. After that, get a qualified DBA to help you manage your database performance. -- Fajar
2013/9/25 Arran Cudbard-Bell <a.cudbardb@freeradius.org>
On 25 Sep 2013, at 20:54, Alisson <alissongoncalves@bsd.com.br> wrote:
This messages are from radius.log
Those errors were generated by the MySQL client library or the MySQL server, just because they're included in the radius.log file does not mean they originated from within the FreeRADIUS code base.
I've doesn't changed anything in db... and I haven't custom queries...
Here is a post describing possible causes. I've never seen this with the stock queries and schema.
http://stackoverflow.com/questions/2332768/how-to-avoid-mysql-deadlock-found...
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (3)
-
Alisson -
Arran Cudbard-Bell -
Fajar A. Nugraha