WARNING: Unclosed connection!

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
User avatar
thorl2
Posts: 159
Joined: Fri Mar 20, 2009 9:04 am

WARNING: Unclosed connection!

Post by thorl2 »

» Find Revision
L2J Revision 4089:
L2JDP Revision 7284:


afther the 5.03.2010 core update server console started to show this error:

Code: Select all

03.05.2010 07:19:43 com.l2jserver.L2DatabaseFactory$ConnectionCloser runWARNING: Unclosed connection! Trace: sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)java.lang.RuntimeException	at com.l2jserver.L2DatabaseFactory.getConnection(L2DatabaseFactory.java:223)	at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)	at java.lang.reflect.Method.invoke(Unknown Source)	at org.python.core.PyReflectedFunction.__call__(Unknown Source)	at org.python.core.PyMethod.__call__(Unknown Source)	at org.python.core.PyObject.__call__(Unknown Source)	at org.python.core.PyInstance.invoke(Unknown Source)	at org.python.pycode.serializable._pyx1272858857375.onAdvEvent$14(__init__.py:756)	at org.python.pycode.serializable._pyx1272858857375.call_function(__init__.py)	at org.python.core.PyTableCode.call(Unknown Source)	at org.python.core.PyTableCode.call(Unknown Source)	at org.python.core.PyTableCode.call(Unknown Source)	at org.python.core.PyFunction.__call__(Unknown Source)	at org.python.core.PyMethod.__call__(Unknown Source)	at org.python.core.PyObject.__call__(Unknown Source)	at org.python.core.PyObject._jcallexc(Unknown Source)	at org.python.core.PyObject._jcall(Unknown Source)	at org.python.proxies.main$Quest$415.onAdvEvent(Unknown Source)	at com.l2jserver.gameserver.model.quest.Quest.notifyEvent(Quest.java:406)	at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.processQuestEvent(L2PcInstance.java:1717)	at com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:218)	at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:92)	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)	at java.lang.Thread.run(Unknown Source)
i think my buffer is not closing the database connections, here is a part of my phyton code ( too big to post all... )

Code: Select all

import sysfrom java.lang import Systemfrom java.util import Iteratorfrom com.l2jserver import Configfrom com.l2jserver.gameserver.model.quest import Statefrom com.l2jserver.gameserver.model.quest import QuestStatefrom com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuestfrom com.l2jserver.gameserver.instancemanager import QuestManagerfrom com.l2jserver import L2DatabaseFactoryfrom com.l2jserver.gameserver.datatables import SkillTablefrom com.l2jserver.gameserver.datatables import ItemTablefrom com.l2jserver.gameserver.model.actor.instance import L2PcInstancefrom com.l2jserver.gameserver.model.actor.instance import L2PetInstancefrom com.l2jserver.gameserver.model.actor.instance import L2SummonInstancefrom com.l2jserver.gameserver.network.serverpackets import SetSummonRemainTimefrom com.l2jserver.gameserver.network.serverpackets import SetupGauge QUEST_ID = 555QUEST_NAME   = "NPCBuffer"QUEST_DESCRIPTION   = "custom"QUEST_LOADING_INFO = str(QUEST_ID)+"_"+QUEST_NAMENPC_ID = 555 TITLE_NAME = "Rin4a's Buffer"SCRIPT_RELOAD = True ENABLE_VIP_BUFFER = FalseVIP_ACCESS_LEVEL = 1                ENABLE_BUFF_SECTION = True    ENABLE_SCHEME_SYSTEM = True              ENABLE_HEAL = True                       ENABLE_BUFFS = True                      ENABLE_RESIST = True                     ENABLE_SONGS = True                      ENABLE_DANCES = True                     ENABLE_CHANTS = False                 ENABLE_OTHERS = True                     ENABLE_SPECIAL = True                    ENABLE_CUBIC = True                    ENABLE_BUFF_REMOVE = True                ENABLE_BUFF_SET = TrueBUFF_WITH_KARMA = False                  FREE_BUFFS = False                       TIME_OUT = True           TIME_OUT_TIME = 10                    MIN_LEVEL = 20                           BUFF_REMOVE_PRICE = 100000                 HEAL_PRICE = 1000000                      BUFF_PRICE = 100000                     RESIST_PRICE = 100000                    SONG_PRICE = 100000                      DANCE_PRICE = 100000                      CHANT_PRICE = 100000                      OTHERS_PRICE = 1000000                     SPECIAL_PRICE = 1000000                   CUBIC_PRICE = 1000000                    BUFF_SET_PRICE = 10000000                 SCHEME_BUFF_PRICE = 10000000              SCHEMES_PER_PLAYER = 4                   CONSUMABLE_ID = 57                       MAX_SCHEME_BUFFS = Config.BUFFS_MAX_AMOUNTMAX_SCHEME_DANCES = Config.DANCES_MAX_AMOUNT def rebuildMainHtml(st) :	MAIN_HTML_MESSAGE = "<html><head><title>"+TITLE_NAME+"</title></head><body><center><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"; MESSAGE = ""	bottonA="Auto Buff";bottonB="Heal Me";bottonC="Rem. Buffs";i=0;j=0;Temp="<tr><td> </td> <td> </td></tr>";TRS = Temp.split(" ")	if st.getInt("Pet-On-Off") == 1:		bottonA="Auto Buff Pet";bottonB="Heal My Pet";bottonC="Rem. Pet Buffs"		MAIN_HTML_MESSAGE += "<button value=\"Pet Options\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " buffpet 0 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"		else: MAIN_HTML_MESSAGE += "<button value=\"Char Options\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " buffpet 1 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"	if ENABLE_BUFF_SECTION == True :			if ENABLE_BUFFS == True :			if i>2:i=0			MESSAGE += TRS[i]+"<button value=\"Buffs\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_buffs 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1]			i+=2;j+=1		if ENABLE_RESIST == True :		       	if i>2:i=0			MESSAGE += TRS[i]+"<button value=\"Resist\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_resists 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1]	                	i+=2;j+=1		if ENABLE_SONGS == True :			if i>2:i=0			MESSAGE += TRS[i]+"<button value=\"Songs\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_songs 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1]			i+=2;j+=1		if ENABLE_DANCES == True :			if i>2:i=0			MESSAGE += TRS[i]+"<button value=\"Dances\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_dances 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1]			i+=2;j+=1		if ENABLE_CHANTS == True :			if i>2:i=0			MESSAGE += TRS[i]+"<button value=\"Chants\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_chants 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1]			i+=2;j+=1		if ENABLE_SPECIAL == True :			if i>2:i=0			MESSAGE += TRS[i]+"<button value=\"Special\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_special 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1]			i+=2;j+=1		if ENABLE_OTHERS == True :			if i>2:i=0			MESSAGE += TRS[i]+"<button value=\"Others\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_others 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1]			i+=2;j+=1	if ENABLE_CUBIC == True:		if i>2:i=0		MESSAGE += TRS[i]+"<button value=\"Cubics\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_cubic 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1]		i+=2;j+=1	if ENABLE_BUFF_SET == True :		if i>2:i=0		MESSAGE += TRS[i]+"<button value=\""+bottonA+"\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " castBuffSet 0 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1]				i+=2;j+=1	if ENABLE_HEAL == True :		if i>2:i=0		MESSAGE += TRS[i]+"<button value=\""+bottonB+"\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " heal 0 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1]			i+=2;j+=1	if ENABLE_BUFF_REMOVE == True:		if i>2:i=0		MESSAGE += TRS[i]+"<button value=\""+bottonC+"\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " removeBuffs 0 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1]					i+=2;j+=1	if j == 1: MAIN_HTML_MESSAGE+= MESSAGE + "<br>"	else: MAIN_HTML_MESSAGE+= "<table>" + MESSAGE + "</table><br>"	if ENABLE_SCHEME_SYSTEM == True : 		MAIN_HTML_MESSAGE += generateScheme(st) 	if st.getPlayer().isGM() : 		MAIN_HTML_MESSAGE += "<br><button value=\"Manage Buffs\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect manage_buffs 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"	MAIN_HTML_MESSAGE += "<br><font color=\"303030\">"+TITLE_NAME+"</font>"	MAIN_HTML_MESSAGE += "</center></body></html>"	return MAIN_HTML_MESSAGE def generateScheme(st) :	schemeName = []	schemeId = []	HTML = ""	conn=L2DatabaseFactory.getInstance().getConnection()	rss = conn.prepareStatement("SELECT * FROM buffer_scheme_list WHERE player_id="+str(st.getPlayer().getObjectId()))	action=rss.executeQuery()	while (action.next()) :		try :			schemeName += [action.getString("scheme_name")]			schemeId += [action.getString("id")]		except : print "Query error!"	try : conn.close()	except : pass	if len(schemeName) > 0:		MESSAGE = ""		i=0;j=0;Temp="<tr><td> </td> <td> </td></tr>";TRS = Temp.split(" ")		while i <= len(schemeName) - 1:		       	if j>2:j=0			MESSAGE += TRS[j]+"<button value=\""+schemeName[i]+"\" action=\"bypass -h Quest "+QUEST_LOADING_INFO+" cast "+schemeId[i]+" x x\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[j+1]			i+=1;j+=2		if i == 1: HTML+= MESSAGE + "<br>"		else: HTML+= "<table>" + MESSAGE + "</table><br>"	if len(schemeName) < SCHEMES_PER_PLAYER :		HTML += "<table><tr><td><button value=\"Create\" action=\"bypass -h Quest "+QUEST_LOADING_INFO+" create_1 x x x\" width=85 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>"	else : HTML += "<table width=100><tr>"	if len(schemeName) > 0 :		HTML += "<td><button value=\"Edit\" action=\"bypass -h Quest "+QUEST_LOADING_INFO+" edit_1 x x x\" width=85 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>"		HTML += "<td><button value=\"Delete\" action=\"bypass -h Quest "+QUEST_LOADING_INFO+" delete_1 x x x\" width=85 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table>"					else : HTML += "</tr></table>"	return HTML def reloadPanel(st) :	HTML_MESSAGE = "<html><head><title>"+TITLE_NAME+"</title></head><body><center><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"	HTML_MESSAGE += "<font color=\"303030\">"+TITLE_NAME+"</font><br>"	HTML_MESSAGE += "<img src=\"L2UI.SquareGray\" width=250 height=1><br>"	HTML_MESSAGE += "<table width=260 border=0 bgcolor=444444>"	HTML_MESSAGE += "<tr><td><br></td></tr>"                                                                                                                                                                                                	HTML_MESSAGE += "<tr><td align=\"center\"><font color=\"FFFFFF\">This option can be seen by GMs only and it<br1>allow to update any changes made in the<br1>script. You can disable this option in<br1>the settings section within the Script.<br><font color=\"LEVEL\">Do you want to update the SCRIPT?</font></font></td></tr>"	HTML_MESSAGE += "<tr><td></td></tr></table><br>"	HTML_MESSAGE += "<img src=\"L2UI.SquareGray\" width=250 height=1><br><br>"	HTML_MESSAGE += "<button value=\"Yes\" action=\"bypass -h Quest "+QUEST_LOADING_INFO+" reloadscript 1 0 0\" width=50 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"	HTML_MESSAGE += "<button value=\"No\" action=\"bypass -h Quest "+QUEST_LOADING_INFO+" reloadscript 0 0 0\" width=50 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"					HTML_MESSAGE += "</center></body></html>"	return HTML_MESSAGE def getitemname(st,itemval):	conn=L2DatabaseFactory.getInstance().getConnection()	itemidList = conn.prepareStatement("SELECT * FROM etcitem WHERE item_id="+str(itemval))	il=itemidList.executeQuery()	val = "No Name"	if il :		il.next()		try : val = il.getString("name")							except : pass	try : conn.close()	except: pass	return val def getBuffCount(scheme) :	count = 0	conn=L2DatabaseFactory.getInstance().getConnection()	rss = conn.prepareStatement("SELECT * FROM buffer_scheme_contents WHERE scheme_id=\""+str(scheme)+"\"")	action=rss.executeQuery()	while (action.next()) :		try : count += 1		except : count = 0	try : conn.close()	except : pass			return count def getBuffType(id) :	conn=L2DatabaseFactory.getInstance().getConnection()	act = conn.prepareStatement("SELECT buffType FROM buffer_buff_list WHERE buffId=? LIMIT 1")	act.setInt(1, int(id))	rs=act.executeQuery()	val = "none"	if rs :		rs.next()		try : val = rs.getString("buffType")							except : val = "none"	try : conn.close()	except: pass	return val ----------------------------------------------------------------------- 		if event == "castBuffSet" :			if int(System.currentTimeMillis()/1000) > st.getInt("blockUntilTime") :				if FREE_BUFFS == False :					if st.getQuestItemsCount(CONSUMABLE_ID) < BUFF_SET_PRICE : 						return showText(st,"Sorry","You don't have the enough items:<br>You need: <font color =\"LEVEL\">"+str(BUFF_SET_PRICE)+" "+str(getitemname(st,CONSUMABLE_ID))+"!","False",0,0)				buff_sets=[]; i = 0; player_class = 3				if st.getPlayer().isMageClass() : player_class = 1				else : player_class = 0				if getpetbuff == 0 :					conn=L2DatabaseFactory.getInstance().getConnection()					getSimilarNameCount = conn.prepareStatement("SELECT buffId,buffLevel FROM buffer_buff_list WHERE forClass IN (?,?) ORDER BY id ASC")					getSimilarNameCount.setString(1, str(player_class))					getSimilarNameCount.setString(2, "2")					rss = getSimilarNameCount.executeQuery()					while (rss.next()) :						try :							id = rss.getInt("buffId")							lvl = rss.getInt("buffLevel")							buff_sets += [id,lvl]						except : buff_sets = []					try: conn.close()					except: pass					while i <= len(buff_sets)-2 :						SkillTable.getInstance().getInfo(buff_sets[i],buff_sets[i+1]).getEffects(st.getPlayer(),st.getPlayer())						i += 2				else:					if st.player.getPet() != None :						i = 0						conn=L2DatabaseFactory.getInstance().getConnection()						getSimilarNameCount = conn.prepareStatement("SELECT buffId,buffLevel FROM buffer_buff_list WHERE forClass IN (?,?) ORDER BY id ASC")						getSimilarNameCount.setString(1, "0")						getSimilarNameCount.setString(2, "2")						rss = getSimilarNameCount.executeQuery()						while (rss.next()) :							try :								id = rss.getInt("buffId")								lvl = rss.getInt("buffLevel")								buff_sets += [id,lvl]							except : buff_sets = []						try: conn.close()						except: pass						while i <= len(buff_sets)-2 :							SkillTable.getInstance().getInfo(buff_sets[i],buff_sets[i+1]).getEffects(st.getPlayer().getPet(),st.getPlayer().getPet())							i += 2					else: return showText(st,"Info","You can't use the Pet's options.<br>Summon your pet first!","False","Return","main")				heal(getpetbuff)				st.takeItems(CONSUMABLE_ID,BUFF_SET_PRICE)				if TIME_OUT == True: addTimeout(3,TIME_OUT_TIME,600)				return rebuildMainHtml(st)			else : return rebuildMainHtml(st)		return rebuildMainHtml(st) 	def onFirstTalk (self,npc,player):		st = player.getQuestState(QUEST_LOADING_INFO)		if not st : st = self.newQuestState(player)		if player.isGM(): 			if SCRIPT_RELOAD == True: return reloadPanel(st)			else: return rebuildMainHtml(st)		elif int(System.currentTimeMillis()/1000) > st.getInt("blockUntilTime"): 			if ENABLE_VIP_BUFFER == False or player.getAccessLevel().getLevel() == VIP_ACCESS_LEVEL and ENABLE_VIP_BUFFER == True: 				if BUFF_WITH_KARMA == False and player.getKarma() > 0 :					return showText(st,"Info","You have too much <font color=\"FF0000\">karma!</font><br>Come back,<br>when you don't have any karma!","False","Return","main") 				elif st.player.getLevel() < MIN_LEVEL :					return showText(st,"Info","Your level is too low!<br>You have to be at least level <font color\"LEVEL\">"+str(MIN_LEVEL)+"</font>,<br>to use my services!","False","Return","main") 				elif st.player.getPvpFlag() > 0 :					return showText(st,"Info","You can't buff while you are <font color=\"800080\">flagged!</font><br>Wait some time and try again!","False","Return","main") 				elif st.player.isInCombat() :					return showText(st,"Info","You can't buff while you are attacking!<br>Stop your fight and try again!","False","Return","main") 				else: return rebuildMainHtml(st) 			else: return showText(st,"Sorry","This buffer is only for VIP's!<br>Contact the administrator for more info!","False","Return","main")		   	else: return showText(st,"Sorry","You have to wait a while!<br>if you wish to use my services!","False","Return","main")  QUEST = Quest(QUEST_ID,QUEST_LOADING_INFO,QUEST_DESCRIPTION)QUEST.addStartNpc(NPC_ID)QUEST.addFirstTalkId(NPC_ID)QUEST.addTalkId(NPC_ID)
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: WARNING: Unclosed connection!

Post by janiii »

yeah, that is why the commit was done - to show unclosed database connections. mostly done by custom code that is not properly coded..

check that all your database connections are properly closed in your custom code. but what you posted looks fine for me.

// sent you a pm back with fixed code
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
xone
Posts: 122
Joined: Thu Nov 05, 2009 5:04 am

Re: WARNING: Unclosed connection!

Post by xone »

pff getting same thing ... have same buffer :|
User avatar
thorl2
Posts: 159
Joined: Fri Mar 20, 2009 9:04 am

Re: WARNING: Unclosed connection!

Post by thorl2 »

i have talked whit janiii and he fixed the script 100% all work now perfect! i will share my server fixed script here for all who need a 100% fix with unclosed connections! all credits for fixing to janiii!


http://dl.transfer.ro/transfer_ro-04may ... 7bcf37.zip
Mage
Posts: 277
Joined: Fri Apr 17, 2009 2:29 pm

Re: WARNING: Unclosed connection!

Post by Mage »

thorl2 wrote:i have talked whit janiii and he fixed the script 100% all work now perfect! i will share my server fixed script here for all who need a 100% fix with unclosed connections! all credits for fixing to janiii!


http://dl.transfer.ro/transfer_ro-04may ... 7bcf37.zip

Thank u. Is it possible to have a DIFF file?
Forum rules: Please do not use or alter the official L2J Avatars/Signatures/Names for your personal use.
User avatar
thorl2
Posts: 159
Joined: Fri Mar 20, 2009 9:04 am

Re: WARNING: Unclosed connection!

Post by thorl2 »

search google TextDiff it's the best and free
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: WARNING: Unclosed connection!

Post by jurchiks »

WinMerge is a good program too.
But you can compare in Eclipse too...
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
Maraxer
Posts: 10
Joined: Sun Aug 12, 2007 1:16 pm

Re: WARNING: Unclosed connection!

Post by Maraxer »

Can someone reupload that file?
I would gladly share my custom mods, but I can't because I don't have 20 posts.
It almost rhymes :D
zlati
Posts: 37
Joined: Mon Nov 12, 2007 4:41 am
Contact:

Re: WARNING: Unclosed connection!

Post by zlati »

use this one , will work 100% , i fixed the code to close the unused connections :

Code: Select all

http://pastebin.com/E7UKH3VY
FightMySelf
Posts: 6
Joined: Sat Mar 27, 2010 11:23 pm

Re: WARNING: Unclosed connection!

Post by FightMySelf »

zlati can u say me what u change becose i got same script but i delete the option for pet buffer becose i didnt find another way to disable it :) so i want just to change the lines that make this error
ramms
Posts: 20
Joined: Wed Jan 27, 2010 12:20 am

Re: WARNING: Unclosed connection!

Post by ramms »

yes, please can you tell us what lines you changed ? i have same problem with my buffer.
zlati
Posts: 37
Joined: Mon Nov 12, 2007 4:41 am
Contact:

Re: WARNING: Unclosed connection!

Post by zlati »

i have added script to close connections , for example :

Code: Select all

                         except :                                try : conn.close()                                except : pass or                         try :                            rem.executeUpdate()                                rem.close()                                conn.close() 
Use this source code , and if you want to disable pet functions , then remove it from this source. Is my advice
ramms
Posts: 20
Joined: Wed Jan 27, 2010 12:20 am

Re: WARNING: Unclosed connection!

Post by ramms »

very thnx
FightMySelf
Posts: 6
Joined: Sat Mar 27, 2010 11:23 pm

Re: WARNING: Unclosed connection!

Post by FightMySelf »

Error on: .....\gameserver\data\scripts\custom\555_NPCBUFFER\__init__.py.error.log
Line: -1 - Column: -1

Traceback (innermost last):
(no code object) at line 0
SyntaxError: ('invalid syntax', ('__init__.py', 718, 33, '\t\t\t\trem.close()'))

with ur fixed script i got this error.

with my old script.
I got unclosed connection when remove any buff in my sheme if i remove 1 buff will get one unclosed connection 2=2 3=3...

I was trying differend ways to close the connection on rem.buffs event but still dont get it work
belak
Posts: 32
Joined: Thu Jan 04, 2007 6:57 pm

Re: WARNING: Unclosed connection!

Post by belak »

i'm used this code, but have unclosed connection in all custom npcs.
ex:
I have scripts: top list pvp/pk; scheme buffer and anti afk tvt. All generate unclosed connections. :(
Post Reply