Server error and freeze!

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Removed20180815
Posts: 93
Joined: Tue Jan 09, 2007 12:41 pm

Re: Server error and freez!

Post 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
Removed20180815
Posts: 93
Joined: Tue Jan 09, 2007 12:41 pm

Re: Server error and freez!

Post 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?
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: Server error and freez!

Post by JIV »

then kick player if he dont make restart in 15seconds.
Removed20180815
Posts: 93
Joined: Tue Jan 09, 2007 12:41 pm

Re: Server error and freez!

Post 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
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: Server error and freez!

Post 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.
Removed20180815
Posts: 93
Joined: Tue Jan 09, 2007 12:41 pm

Re: Server error and freez!

Post 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.
User avatar
ZaKaX
Posts: 357
Joined: Thu Nov 22, 2007 6:28 am
Location: Somewhere in Asia.

Re: Server error and freez!

Post 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
¿ Que dice los cojones de la nina ?
Removed20180815
Posts: 93
Joined: Tue Jan 09, 2007 12:41 pm

Re: Server error and freez!

Post 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.
Removed20180815
Posts: 93
Joined: Tue Jan 09, 2007 12:41 pm

Re: Server error and freez!

Post 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.
Removed20180815
Posts: 93
Joined: Tue Jan 09, 2007 12:41 pm

Re: Server error and freeze!

Post 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
Probe
Posts: 915
Joined: Thu Sep 03, 2009 6:36 pm
Location: Israel
Contact:

Re: Server error and freeze!

Post 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.
Removed20180815
Posts: 93
Joined: Tue Jan 09, 2007 12:41 pm

Re: Server error and freeze!

Post 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)
User avatar
ratonofx
Posts: 135
Joined: Thu Nov 23, 2006 2:39 am

Re: Server error and freeze!

Post 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.
Removed20180815
Posts: 93
Joined: Tue Jan 09, 2007 12:41 pm

Re: Server error and freeze!

Post 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 :|
User avatar
JavierDC
Posts: 132
Joined: Sun Feb 03, 2008 10:16 pm
Contact:

Re: Server error and freeze!

Post 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.
Last edited by JavierDC on Mon Feb 22, 2010 4:00 am, edited 1 time in total.
perdon por mi ingles, traducido desde goggle
Post Reply