Jump to content

Question

Posted

Καλησπέρα  σας,

Παρακαλώ την βοήθεια σας με το παρακάτω μήνυμα, ο server σταματάει  (L2J H5)  και προσπαθώ να βρω τι το προκαλεί :

 

[28/05 02:26:52] BoneCPConnectionFactory: Unable to get a connection!
java.sql.SQLException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.jolbox.bonecp.PoolUtil.generateSQLException(PoolUtil.java:192)
    at com.jolbox.bonecp.DefaultConnectionStrategy.getConnectionInternal(DefaultConnectionStrategy.java:95)
    at com.jolbox.bonecp.AbstractConnectionStrategy.getConnection(AbstractConnectionStrategy.java:90)
    at com.jolbox.bonecp.BoneCP.getConnection(BoneCP.java:552)
    at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:131)
    at com.l2jserver.commons.database.pool.IConnectionFactory.getConnection(IConnectionFactory.java:60)
    at com.l2jserver.gameserver.model.variables.PlayerVariables.storeMe(PlayerVariables.java:90)
    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.store(L2PcInstance.java:7160)
    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.storeMe(L2PcInstance.java:7174)
    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.deleteMe(L2PcInstance.java:10806)
    at com.l2jserver.gameserver.network.L2GameClient$CleanupTask.run(L2GameClient.java:917)
    at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:89)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)


Caused by: java.lang.InterruptedException
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(Unknown Source)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
    at java.util.concurrent.LinkedBlockingQueue.poll(Unknown Source)
    at com.jolbox.bonecp.DefaultConnectionStrategy.getConnectionInternal(DefaultConnectionStrategy.java:82)
    ... 17 more

6 answers to this question

Recommended Posts

  • 0
Posted (edited)

λογικά ή έχεις κάποιο κακό feature που κάνει πολλά db connections ή έχεις κάνει αρκετά limit τα db connections σου

Edited by Zake
  • 0
Posted

Καλησπέρα,

 

# The time before a database connection closes (in milliseconds)
# If a query takes longer to execute than the time defined here, the server will throw "Unclosed Connection!" error.
# If you get often this error message, try increasing this.
# Default: 60000ms
ConnectionCloseTime = 120000

 

Feature αρκετά , μπορώ να πάρω μια αναφορά τι και κάθε πότε πραγματοποιεί σύνδεση με την βάση ?

  • 0
Posted (edited)

Generally due to connection leak, due to badly written custom code. Use the try-with-resources statement whenever you open a connection.

 

https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html

 

The other possibility being, you try to save all Players variables (custom variables) in a single loop, making the connection pool dry instantly. In that case, write your own version of storeMe which use only one connection and addBatch/executeBatch.

Edited by Tryskell
  • Thanks 1
  • 0
Posted

Ευχαριστώ το πρόβλημα λύθηκε.

 

Ενεργοποίησα την επιλογή 

<property name="closeConnectionWatch">true</property>

 

στο αρχείο :

/libs/bonecp-0.8.1.RELEASE.jar

 

και ανέφερε λεπτομέρειες για το σφάλμα που βοήθησαν να βρω το script που δεν έκλεινε τα connections που έκανε στην βάση.

Guest
This topic is now closed to further replies.


  • Posts

    • 12-07-2025 - OUR TOPIC IS RELEVANT! CONTACT US BY THE CONTACTS BELOW
    • Hundreds of players have already jumped into the world of L2Elixir x3, and the server grows bigger every day! A truly international community is forming — EU, NA, LATAM, Asia — all gathering for the same purpose: To relive the L2Elixir era the right way. Join now and be part of the early wave!   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs   🎄 Christmas Event Activated! 🎄 Craft your Ordinary or Special Christmas Tree, place it outside of a peace zone, and enjoy festive outfits, boosted EXP/SP, Adena, and Drop Rates, plus the Holiday Festival buff  (more HP/MP/CP, higher P.Def/P.Atk/M.Atk, faster movement, reduced MP cost!) every 12-hours! 🎁 Santa’s Hourly Gifts While you’re actively farming, Santa appears worldwide to drop special rewards such as: Special Christmas Tree Christmas Red Sock Santa’s Weapon Exchange Ticket (12h) Gift from Santa Santa Hats & Rudolph accessories Agathion: Rudolph Chest of Experience Shadow Hats Scrolls Event b.soe / b.rez Loot Crates 🔥 Santa’s Weapon Ticket Gives you a D/C/B-grade weapon based on your level, randomly enchanted +4 to +10!  4-hour expiration time. Celebrate, fight, farm — and let Santa upgrade your holidays! 🎅✨
    • what do u mean i want to change the normal weapons some weapons are working perftect some not getting th effect and the arcana has the effect above the weapons as u see ... i dont what is the probkenm
    • Stop paying for files that are already public and free. Here you can download a fully working Interlude server with C4-like gameplay, including source code so you can compile it yourself and verify everything. People will try to convince you that free releases are “broken”, “full of backdoors”, etc. That’s exactly why I’m also providing the SVN with the full source – so you can: Review the code yourself Remove / modify whatever you don’t like Compile your own binaries What’s included GX-EXT Interlude server (C4-style gameplay) – L2Off Client Interlude tweaked for C4 gameplay Public SVN with source code Downloads: Server GX-EXT: https://www.mediafire.com/file/q5ipkjd36tnhfxv/L2OFF_C4_C4_ACU_GXEXT.rar/file Client Interlude C4 Gameplay: https://www.mediafire.com/file/rdkfc8wwau042oh/Cliente_Interlude_Jugabilidad_C4.rar/file SVN (source code, delayed a couple of months to avoid reselling fresh work): https://svn.l2servers.com.ar/!/#GX-EXT_INTERLUDE User: gx Pass: gx How to compile To compile the source you will need: Visual Studio 2005 (x64 toolset) (Classic L2Off toolchain – yes, it’s old, but that’s what the original server uses.) Use this as you want: learn, test, open your own server, or just audit the code. But please, stop buying the same leaked/resold files over and over when you can get them here for free, with source, and actually know what you’re running.  
    • @GX-Ext Please reupload the pack+web+client because all the links inside that post or in the https://l2servers.com.ar/ are dead
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock