Server error and freeze!
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 93
- Joined: Tue Jan 09, 2007 12:41 pm
Re: Server error and freez!
yeap ^^ with this one works. So all script should be fine right? I will put it and see if i get the first error from this thread again...i hope it works. Thx alot janiii
-
- Posts: 93
- Joined: Tue Jan 09, 2007 12:41 pm
Re: Server error and freez!
Well i still get the first error. Server freeze, mass disconects and the error from the fisrt post! Maybe there is anyway not to use the store option. st.player.store <<< cause i think the error is from that. The script uses store because players need to restart after add stacksub and some dont and thats why it uses store. Maybe it can be chanced and use autorestart when players add sub?
- JIV
- L2j Veteran
- Posts: 1882
- Joined: Sun Jan 06, 2008 8:17 pm
- Location: Slovakia
- Contact:
Re: Server error and freez!
then kick player if he dont make restart in 15seconds.
-
- Posts: 93
- Joined: Tue Jan 09, 2007 12:41 pm
Re: Server error and freez!
yes but how? i dont know jthyon. what should i put instead of st.player.store() so players get kicked in 15 seconds if they dont restart? Thx alot
- JIV
- L2j Veteran
- Posts: 1882
- Joined: Sun Jan 06, 2008 8:17 pm
- Location: Slovakia
- Contact:
Re: Server error and freez!
if you are not capable to do basic QuestTimer you just shouldnt run server (no offense just my advice
) obviously if you dont have any dev for server. Only thing what you can do is remove these scripts from server and wait till someone fix it for you OR you can learn something and try fix it by yourself.

-
- Posts: 93
- Joined: Tue Jan 09, 2007 12:41 pm
Re: Server error and freez!
I know alot of things... i just dont know how to write in these scripts. I dont think you know all programming languages... I ask for help cause i rly dont know jthyon and there is no time for me to learn it now cause this needs to be fixed asap. Thats why i asked help here.
- ZaKaX
- Posts: 357
- Joined: Thu Nov 22, 2007 6:28 am
- Location: Somewhere in Asia.
Re: Server error and freez!
I'd recommend rewriting it to Java, Python fucking sucks.
Btw...
onAdvEvent:
if (event.equalsIgnoreCase("EventName"))
{
//TODO
}
To call it...
this.startQuestTimer("EventName", timeInMillis, npc, activeChar);
That's it, more or less. Have fun
Btw...
onAdvEvent:
if (event.equalsIgnoreCase("EventName"))
{
//TODO
}
To call it...
this.startQuestTimer("EventName", timeInMillis, npc, activeChar);
That's it, more or less. Have fun

¿ Que dice los cojones de la nina ?
-
- Posts: 93
- Joined: Tue Jan 09, 2007 12:41 pm
Re: Server error and freez!
Well i talked with a player and i saw him adding subclass and after that the server went down! Its from the st.player.store() 100%. The player needs to restart imediately. Can any1 pls tell me with what should i replace st.player.store in script to make them restart? PLease... and my problem is solved. Ty in advance.
-
- Posts: 93
- Joined: Tue Jan 09, 2007 12:41 pm
Re: Server error and freez!
ok i found out: st.player.logout() << this kicks player out of game BUT how can i kick it after 10 seconds? Thanks alot...
edit: never mind even if i removed store function and i was kicking players to force restart i still get the error from first post.
edit: never mind even if i removed store function and i was kicking players to force restart i still get the error from first post.
-
- Posts: 93
- Joined: Tue Jan 09, 2007 12:41 pm
Re: Server error and freeze!
Guys cmon noone cant seem to find out from what could this be? The scripts are ok, i even changed the wamp server and installed independently the mysql server i increased teh query_chache_size and tmp_table_size and still get the crush and players get mass disconected. I rly need some help...
Edit: i am getting this error now when players get mass disconect and server crashes:

Edit: i am getting this error now when players get mass disconect and server crashes:

-
- Posts: 915
- Joined: Thu Sep 03, 2009 6:36 pm
- Location: Israel
- Contact:
Re: Server error and freeze!
again. you have some script that opens a connection to db and doesn't close it.
go through your custom scripts line by line, check that for every Connection conn; you open
there is a conn.close();
really not much we can help other than that, I know for a fact that an open connection is causing this because I had a similar problem and it was fixed when I closed all connections.
go through your custom scripts line by line, check that for every Connection conn; you open
there is a conn.close();
really not much we can help other than that, I know for a fact that an open connection is causing this because I had a similar problem and it was fixed when I closed all connections.
-
- Posts: 93
- Joined: Tue Jan 09, 2007 12:41 pm
Re: Server error and freeze!
Well i think the problem is from here, can any1 pls check the code? Ty
Code: Select all
if event == "camb": if temp2!=temp3: return errordeclasse(st,eventParam1,"switch to") elif st.getPlayer().getClassId().level() < 2 and AllowThirdJob == False or st.getPlayer().getClassId().level() < 3 and AllowThirdJob == True : return comunerrors(st,"5") elif st.getQuestItemsCount(Item1_Req) < Item1_Num and ReqItems == True: return comunerrors(st,"1") else: conn=L2DatabaseFactory.getInstance().getConnection() upd=conn.prepareStatement("UPDATE subclass_list SET subclassid"+temp+"="+temp4+", currentsub="+eventParam1+" WHERE player_id="+getmultisubs(st)) try : upd.executeUpdate() upd.close() conn.close() except : try : conn.close() except : pass if resetskills(st) == 1: pass st.player.setClassId(int(getVar(st,"subclassid"+eventParam1))) if not st.player.isSubClassActive(): st.player.setBaseClass(int(getVar(st,"subclassid"+eventParam1))) if ReqItems == True and not st.player.isGM(): st.takeItems(Item1_Req,Item1_Num) st.player.store() st.player.broadcastUserInfo() return complete(st) st.exitQuest(1)
- ratonofx
- Posts: 135
- Joined: Thu Nov 23, 2006 2:39 am
Re: Server error and freeze!
seems your mysql has not a properly setup.
Paste you my.cnf or my.ini here so we can give you a light. If you use linux you can use a app mysqlcheck to optmize your database server.
Remind, always is good keep the game database separated from webserver.
Paste you my.cnf or my.ini here so we can give you a light. If you use linux you can use a app mysqlcheck to optmize your database server.
Remind, always is good keep the game database separated from webserver.
-
- Posts: 93
- Joined: Tue Jan 09, 2007 12:41 pm
Re: Server error and freeze!
Here it is:
http://pastebin.com/m3eaaa8c4
I removed the AIO script(the second one) and i dont get the error anymore BUT still the server freezes and all players get disconnected
http://pastebin.com/m3eaaa8c4
I removed the AIO script(the second one) and i dont get the error anymore BUT still the server freezes and all players get disconnected

- JavierDC
- Posts: 132
- Joined: Sun Feb 03, 2008 10:16 pm
- Contact:
Re: Server error and freeze!
variables to consider.
español
variables a tener en cuenta.
max_connections=300
table_cache=3000 <--------------> table_cache = (max_connections * 10)
query_cache_size=350M <------------> >increased the total size of the database (l2jdb).
query_cache_type=1
query_cache_limit=512k
tmp_table_size=0M <---------> l2j not use
I'm using this configuration without any problem.
español
esta configuración estoy usando, sin ningún problema.
ademas agrego esto (gracias _DS_)
I use all "static" (e.g. weapons, armors) tables in MyISAM and several large tables (characters, items) in InnoDB, due to several problems.
español
variables a tener en cuenta.
max_connections=300
table_cache=3000 <--------------> table_cache = (max_connections * 10)
query_cache_size=350M <------------> >increased the total size of the database (l2jdb).
query_cache_type=1
query_cache_limit=512k
tmp_table_size=0M <---------> l2j not use
I'm using this configuration without any problem.
español
esta configuración estoy usando, sin ningún problema.
Code: Select all
[client]port=3306 [mysql]default-character-set=latin1 [mysqld]port=3306basedir="C:/Program Files/MySQL/MySQL Server 5.1/"datadir="C:/Program Files/MySQL/MySQL Server 5.1/Data/"default-character-set=latin1default-storage-engine=INNODBsql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"max_connections=300table_cache=3000 query_cache_size=350Mquery_cache_type=1query_cache_limit=512k #posible que no hacen faltatmp_table_size=0M#max_heap_table_size=512M thread_cache_size=2048log_slow_queriesmemlock #probar esto, antes 14400wait_timeout =3600interactive_timeout=3600 query_prealloc_size=16k #*** MyISAM Specific optionsmyisam_max_sort_file_size=100Gmyisam_max_extra_sort_file_size=100Gmyisam_sort_buffer_size=30Mkey_buffer_size=350Mread_buffer_size=64Kread_rnd_buffer_size=256Ksort_buffer_size=256k #*** INNODB Specific options ***innodb_data_home_dir="C:/MySQL Datafiles/"#skip-innodbinnodb_additional_mem_pool_size=6Minnodb_flush_log_at_trx_commit=1innodb_log_buffer_size=3Minnodb_buffer_pool_size=350Minnodb_log_file_size=50Minnodb_thread_concurrency=8innodb_lock_wait_timeout =50innodb_file_per_tableinnodb_open_files=2400
ademas agrego esto (gracias _DS_)
I use all "static" (e.g. weapons, armors) tables in MyISAM and several large tables (characters, items) in InnoDB, due to several problems.
Last edited by JavierDC on Mon Feb 22, 2010 4:00 am, edited 1 time in total.
perdon por mi ingles, traducido desde goggle