Page 1 of 2

Server Freeze

Posted: Wed Jun 08, 2011 3:23 am
by knoppix
L2J Revision 4661:
L2JDP Revision 8051:

Hi, perhaps someone can help me with this, i have a live server and sometime for a few minutes the server freeze, and then this errors appears on the stdout.log of the game server, and then everything is back to normal, does anyone recognize this error?

Code: Select all

com.mchange.v2.resourcepool.BasicResourcePool@6126f827 -- an attempt to checkout a resource was interrupted, and the pool is still live: some other thread must have either interrupted the Thread attempting checkout!java.lang.InterruptedException        at java.lang.Object.wait(Native Method)        at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1402)        at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:594)        at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:514)        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:681)        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:608)        at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)        at com.l2jserver.L2DatabaseFactory.getConnection(L2DatabaseFactory.java:225)        at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.transformInsertInfo(L2PcInstance.java:4935)        at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.store(L2PcInstance.java:7594)        at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.store(L2PcInstance.java:7604)        at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.deleteMe(L2PcInstance.java:11487)        at com.l2jserver.gameserver.network.L2GameClient$CleanupTask.run(L2GameClient.java:805)        at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:86)        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)        at java.util.concurrent.FutureTask.run(FutureTask.java:166)        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)        at java.lang.Thread.run(Thread.java:636) L2DatabaseFactory: getConnection() failed, trying again An SQLException was provoked by the following failure: java.lang.InterruptedExceptionjava.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException        at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)        at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)        at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:617)        at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)        at com.l2jserver.L2DatabaseFactory.getConnection(L2DatabaseFactory.java:225)        at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.transformInsertInfo(L2PcInstance.java:4935)        at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.store(L2PcInstance.java:7594)        at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.store(L2PcInstance.java:7604)        at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.deleteMe(L2PcInstance.java:11487)        at com.l2jserver.gameserver.network.L2GameClient$CleanupTask.run(L2GameClient.java:805)        at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:86)        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)        at java.util.concurrent.FutureTask.run(FutureTask.java:166)        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)        at java.lang.Thread.run(Thread.java:636)Caused by: java.lang.InterruptedException        at java.lang.Object.wait(Native Method)        at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1402)        at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:594)        at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:514)        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:681)        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:608)        ... 16 more 
Any help will be appreciate it.

Let me know if you need any other information.

Re: Server Freeze

Posted: Wed Jun 08, 2011 3:34 am
by MELERIX
system specs ?

Re: Server Freeze

Posted: Wed Jun 08, 2011 3:43 am
by knoppix
MELERIX wrote:system specs ?
Micro:Xeon i5
RAM:8GB
SWAP:16GB
HDD:500Gb SCSI HotSwap 10k
Connection 10 mb/s simetrics

Re: Server Freeze

Posted: Wed Jun 08, 2011 6:17 am
by MELERIX
well logs show c3p0 issues, probably is due your mysql config then.

Re: Server Freeze

Posted: Wed Jun 08, 2011 7:14 am
by Aikimaniac
knoppix wrote:
Micro:Xeon i5
RAM:8GB
SWAP:16GB
HDD:500Gb SCSI HotSwap 10k
Connection 10 mb/s simetrics
can you post your statup line for server?

Re: Server Freeze

Posted: Wed Jun 08, 2011 3:24 pm
by knoppix
Aikimaniac wrote:
knoppix wrote:
Micro:Xeon i5
RAM:8GB
SWAP:16GB
HDD:500Gb SCSI HotSwap 10k
Connection 10 mb/s simetrics
can you post your statup line for server?
java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx4096m -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1

That one?

Also: my.cnf

Code: Select all

## The MySQL database server configuration file.## You can copy this to one of:# - "/etc/mysql/my.cnf" to set global options,# - "~/.my.cnf" to set user-specific options.## One can use all long options that the program supports.# Run program with --help to get a list of available options and with# --print-defaults to see which it would actually understand and use.## For explanations see# http://dev.mysql.com/doc/mysql/en/server-system-variables.html # This will be passed to all mysql clients# It has been reported that passwords should be enclosed with ticks/quotes# escpecially if they contain "#" chars...# Remember to edit /etc/mysql/debian.cnf when changing the socket location.[client]port            = 3306socket          = /var/run/mysqld/mysqld.sock # Here is entries for some specific programs# The following values assume you have at least 32M ram # This was formally known as [safe_mysqld]. Both versions are currently parsed.[mysqld_safe]socket          = /var/run/mysqld/mysqld.socknice            = 0 [mysqld]## * Basic Settings#user            = mysqlpid-file        = /var/run/mysqld/mysqld.pidsocket          = /var/run/mysqld/mysqld.sockport            = 3306basedir         = /usrdatadir         = /var/lib/mysqltmpdir          = /tmplanguage        = /usr/share/mysql/englishskip-external-locking## Instead of skip-networking the default is now to listen only on# localhost which is more compatible and is not less secure.bind-address            = 0## * Fine Tuning#key_buffer              = 16Mmax_allowed_packet      = 16Mthread_stack            = 192Kthread_cache_size       = 8# This replaces the startup script and checks MyISAM tables if needed# the first time they are touchedmyisam-recover         = BACKUP#max_connections        = 100#table_cache            = 64#thread_concurrency     = 10## * Query Cache Configuration#query_cache_limit       = 1Mquery_cache_size        = 16M## * Logging and Replication## Both location gets rotated by the cronjob.# Be aware that this log type is a performance killer.# As of 5.1 you can enable the log at runtime!#general_log_file        = /var/log/mysql/mysql.log#general_log             = 1## Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.## Here you can see queries with especially long duration#log_slow_queries       = /var/log/mysql/mysql-slow.log#long_query_time = 2#log-queries-not-using-indexes## The following can be used as easy to replay backup logs or for replication.# note: if you are setting up a replication slave, see README.Debian about#       other settings you may need to change.#server-id              = 1#log_bin                        = /var/log/mysql/mysql-bin.logexpire_logs_days        = 10max_binlog_size         = 100M#binlog_do_db           = include_database_name#binlog_ignore_db       = include_database_name## * InnoDB## InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.# Read the manual for more InnoDB related options. There are many!## * Security Features## Read the manual, too, if you want chroot!# chroot = /var/lib/mysql/## For generating SSL certificates I recommend the OpenSSL GUI "tinyca".## ssl-ca=/etc/mysql/cacert.pem# ssl-cert=/etc/mysql/server-cert.pem# ssl-key=/etc/mysql/server-key.pem   [mysqldump]quickquote-namesmax_allowed_packet      = 16M [mysql]#no-auto-rehash # faster start of mysql but no tab completition [isamchk]key_buffer              = 16M ## * IMPORTANT: Additional settings that can override those from this file!#   The files must end with '.cnf', otherwise they'll be ignored.#!includedir /etc/mysql/conf.d/
Thanks!!

Re: Server Freeze

Posted: Wed Jun 08, 2011 5:03 pm
by badboy29
What Linux distro you use ? Version of Mysql ?

Re: Server Freeze

Posted: Wed Jun 08, 2011 5:07 pm
by knoppix
badboy29 wrote:What Linux distro you use ? Version of Mysql ?
Debian Squeeze
2.6.32-5-amd64

MySQL: Mysql-Server-5.1

Re: Server Freeze

Posted: Wed Jun 08, 2011 5:27 pm
by badboy29
Ok, try this:

GS:

Code: Select all

java -server -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms2g -Xmx4g -Xmn1g -XX:PermSize=128m -XX:MaxPermSize=256m -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:ParallelGCThreads=2 -XX:MaxGCPauseMillis=5 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -XX:+UseBiasedLocking -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=15 -Xnoclassgc -XX:UseSSE=3 -XX:+UseFastAccessorMethods -XX:+UseStringCache -XX:+UseCompressedStrings -XX:+OptimizeStringConcat -XX:+AggressiveOpts -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1
Mysql:

Code: Select all

## The MySQL database server configuration file.## You can copy this to one of:# - "/etc/mysql/my.cnf" to set global options,# - "~/.my.cnf" to set user-specific options.## One can use all long options that the program supports.# Run program with --help to get a list of available options and with# --print-defaults to see which it would actually understand and use.## For explanations see# http://dev.mysql.com/doc/mysql/en/server-system-variables.html # This will be passed to all mysql clients# It has been reported that passwords should be enclosed with ticks/quotes# escpecially if they contain "#" chars...# Remember to edit /etc/mysql/debian.cnf when changing the socket location.[client]port            = 3306socket          = /var/run/mysqld/mysqld.sock # Here is entries for some specific programs# The following values assume you have at least 32M ram # This was formally known as [safe_mysqld]. Both versions are currently parsed.[mysqld_safe]socket          = /var/run/mysqld/mysqld.socknice            = 0open-files-limit = 8192 [mysqld]## * Basic Settings#user            = mysqlpid-file        = /var/run/mysqld/mysqld.pidsocket          = /var/run/mysqld/mysqld.sockport            = 3306basedir         = /usrdatadir         = /var/lib/mysqltmpdir          = /tmplanguage        = /usr/share/mysql/englishskip-external-locking## Instead of skip-networking the default is now to listen only on# localhost which is more compatible and is not less secure.bind-address            = 0 # The default storage   engine that will be used when create new tables whendefault-storage-engine=INNODB # Set the SQL mode to strictsql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" max_connections = 800table_cache = 2048query_cache_size = 0query_cache_type = 0tmp_table_size = 64Mmax_heap_table_size = 64Mmemlockthread_concurrency = 8thread_cache_size = 200max_allowed_packet = 16Mread_buffer_size = 128Kread_rnd_buffer_size = 16Mjoin_buffer_size = 2Msort_buffer_size = 2Mlow-priority-updatestransaction_isolation = READ-COMMITTED #*** MyISAM Specific optionsmyisam_max_sort_file_size = 100Gmyisam_sort_buffer_size = 64Mkey_buffer_size = 384M # *** INNODB Specific options ***innodb_additional_mem_pool_size = 16Minnodb_buffer_pool_size = 1Ginnodb_data_file_path = ibdata1:10M:autoextendinnodb_thread_concurrency = 8innodb_flush_log_at_trx_commit = 2innodb_log_buffer_size = 16Minnodb_log_file_size = 256Minnodb_log_files_in_group = 2innodb_max_dirty_pages_pct = 90innodb_flush_method = O_DIRECTinnodb_lock_wait_timeout = 120innodb_file_per_table = 1innodb_support_xa = 0innodb_checksums = 0innodb_doublewrite = 0innodb_open_files = 2400 skip-federated [mysqldump]quickmax_allowed_packet = 16M [mysql]no-auto-rehash# Remove the next comment character if you are not familiar with SQL#safe-updates [mysqlhotcopy]interactive-timeout ## * IMPORTANT: Additional settings that can override those from this file!#   The files must end with '.cnf', otherwise they'll be ignored.#!includedir /etc/mysql/conf.d/
Also use:
ALTER TABLE `yourtables` ENGINE = innodb;

PS: Make one backup of your entire database before apply this change

Re: Server Freeze

Posted: Wed Jun 08, 2011 8:15 pm
by knoppix
Hi, thanks for the reply.

I'm testing on my test server, but with that my.cnf file Mysql fail to start :(.

I'm doing some compare between my config file and the one you post to see if i can merge them.

Re: Server Freeze

Posted: Wed Jun 08, 2011 8:20 pm
by badboy29
Check mysql log error, maybe some option doesn't have compatibility with your version.

EDIT: Ah yes, i forgot to say this... stop your mysql service, delete ibdata1, ib_logfile0 and ib_logfile1. Make backup of your database first.

After this you can make these changes and start mysql.

Re: Server Freeze

Posted: Thu Jun 09, 2011 1:55 am
by MELERIX
badboy29 wrote:Ok, try this:

GS:

Code: Select all

java -server -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms2g -Xmx4g -Xmn1g -XX:PermSize=128m -XX:MaxPermSize=256m -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:ParallelGCThreads=2 -XX:MaxGCPauseMillis=5 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -XX:+UseBiasedLocking -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=15 -Xnoclassgc -XX:UseSSE=3 -XX:+UseFastAccessorMethods -XX:+UseStringCache -XX:+UseCompressedStrings -XX:+OptimizeStringConcat -XX:+AggressiveOpts -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1
you don't need to add all of them xD

because some of them are added automatically by Java (Java 6 features), depending of your hardware specs ;)

more detailed info about this here: http://www.oracle.com/technetwork/java/ ... 40102.html

Re: Server Freeze

Posted: Thu Jun 09, 2011 2:27 am
by knoppix
Thank BadBoy29 Mysql is up and running now.

I will test the environment with this settings now, but i'm having some issues with the sentence of the GS.

MELERIX: So basically, i need to modify the mysql config and start the GS with the "original" line that i've post?

"java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx4096m -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1"

Thanks to both of you!!

Re: Server Freeze

Posted: Thu Jun 09, 2011 3:08 pm
by Stake
badboy29 wrote:Also use:
ALTER TABLE `yourtables` ENGINE = innodb;
I would stay at MyISAM, since L2j does not use InnoDB features, and MyISAM is simpler and faster. InnoDB is multi-threaded, so it can easily be locked up by a deadlock. I've never understood why many L2 servers use InnoDB for standard sql. They think they are tough, because they are using something that they don't know what it is for?

Re: Server Freeze

Posted: Thu Jun 09, 2011 8:53 pm
by badboy29
Stake wrote:I would stay at MyISAM, since L2j does not use InnoDB features, and MyISAM is simpler and faster. InnoDB is multi-threaded, so it can easily be locked up by a deadlock. I've never understood why many L2 servers use InnoDB for standard sql. They think they are tough, because they are using something that they don't know what it is for?
Well, i use innodb a few months and never had these problems...