Page 3 of 4

Re: Server error and freez!

Posted: Sun Dec 06, 2009 2:50 pm
by Removed20180815
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

Re: Server error and freez!

Posted: Mon Dec 07, 2009 9:32 am
by Removed20180815
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?

Re: Server error and freez!

Posted: Mon Dec 07, 2009 9:51 am
by JIV
then kick player if he dont make restart in 15seconds.

Re: Server error and freez!

Posted: Mon Dec 07, 2009 10:36 am
by Removed20180815
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

Re: Server error and freez!

Posted: Mon Dec 07, 2009 11:00 am
by JIV
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.

Re: Server error and freez!

Posted: Mon Dec 07, 2009 11:10 am
by Removed20180815
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.

Re: Server error and freez!

Posted: Mon Dec 07, 2009 12:59 pm
by ZaKaX
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 :P

Re: Server error and freez!

Posted: Mon Dec 07, 2009 7:23 pm
by Removed20180815
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.

Re: Server error and freez!

Posted: Tue Dec 08, 2009 8:30 pm
by Removed20180815
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.

Re: Server error and freeze!

Posted: Wed Dec 09, 2009 3:15 pm
by Removed20180815
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:
Image

Re: Server error and freeze!

Posted: Wed Dec 09, 2009 9:53 pm
by Probe
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.

Re: Server error and freeze!

Posted: Thu Dec 10, 2009 8:14 pm
by Removed20180815
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)

Re: Server error and freeze!

Posted: Fri Dec 11, 2009 2:49 pm
by ratonofx
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.

Re: Server error and freeze!

Posted: Fri Dec 11, 2009 5:07 pm
by Removed20180815
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 :|

Re: Server error and freeze!

Posted: Fri Dec 18, 2009 3:38 am
by JavierDC
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.

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.