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
  • 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

    • This is L2Etina’s first opening under our new team, and it’s off to a great start! We’re thrilled with the strong player turnout, the warm feedback, and your response to the major updates. We’re continuing to improve the server and would love to see you in game! ⚔️
    • I dont sell anything and i got scammed kiddo, if you noticed rookie just scammed me and blocked me. so asking this make you immature.
    • @Maxtor @Dragic @Celestine Why you unban this rat, it's will give very negative review if you will try sell something or provide service this very actually should be for @Dragic and his L2Forge sales.
    • Αχ ναι; τοτε γιατι με παρακαλουσες για κωδικες και οτι σου εδινα ελεγες τελεια και wow σαγαπαω? Ε ψευτρακο; Γιατι οτι πηρες λειτουργει οπως το ηθελες ακομη και σε λεπτομερεια που κανας αλλος θα σου ελεγε αντε κ γα*?   Σε τσουξανε οι τιμουλες μου στη τσεπουλα σου; κ βρηκες κανα new chatgpt dev? Φτωχομπινε του κερατα που κανεις παζαρια για 40-50 ευρω κωδικες.   Δεν ασχολουμε αλλο απλα ενημερωνω @Celestineτο παιδακι χρωσταει λεφτα για κωδικα που ελαβε και λειτουργει και το επιβεβαιωσε και με μπλοκαρε κ ολας. Ban η οχι δεν ασχολουμε αλλο. καλη τυχη 
    • den tha asxolithw allo mazi sou randoma,kserei olo to forum ti  eisai
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..