forum.bitel.ru
http://forum.bitel.ru/

Как посмотреть где я накосячил?
http://forum.bitel.ru/viewtopic.php?f=19&t=10766
Страница 1 из 1

Автор:  Phricker [ 05 авг 2015, 18:41 ]
Заголовок сообщения:  Как посмотреть где я накосячил?

В типах устройств добавил свой обработчик управления устройством.
Накидал 22 пустых коммутатора.
Теперь каждый раз как я нажимаю "Перечитать конфигурацию" у меня увеличивается кол-во активных соединений к базе.

Код:
Connections pool to Master status Idle: 2; Active: 66; maxActive: 300; maxIdle: 20

Connections pool to Master status Idle: 2; Active: 88; maxActive: 300; maxIdle: 20

Connections pool to Master status Idle: 2; Active: 110; maxActive: 300; maxIdle: 20


Они так и висят до победы.

show processlist особо ситуации не проясняет.
Код:
mysql> show processlist;
+-----+------+-----------------+-----------+---------+------+-------+------------------+-----------+---------------+
| Id  | User | Host            | db        | Command | Time | State | Info             | Rows_sent | Rows_examined |
+-----+------+-----------------+-----------+---------+------+-------+------------------+-----------+---------------+
|   2 | bill | localhost:43645 | bgbilling | Sleep   |    8 |       | NULL             |         1 |             0 |
|   3 | bill | localhost:43648 | bgbilling | Sleep   |    3 |       | NULL             |         1 |             0 |
|  12 | bill | localhost:43662 | bgbilling | Sleep   |   18 |       | NULL             |         1 |             0 |
|  13 | bill | localhost:43663 | bgbilling | Sleep   |   13 |       | NULL             |         1 |             0 |
|  63 | bill | localhost:43718 | bgbilling | Sleep   |   29 |       | NULL             |         1 |             0 |
|  64 | bill | localhost:43719 | bgbilling | Sleep   |   29 |       | NULL             |         1 |             0 |
|  72 | bill | localhost:43749 | bgbilling | Sleep   |   29 |       | NULL             |         1 |             0 |
|  73 | bill | localhost:43750 | bgbilling | Sleep   |   59 |       | NULL             |         1 |             0 |
| 117 | bill | localhost:43832 | bgbilling | Sleep   |  379 |       | NULL             |         0 |             0 |
| 118 | bill | localhost:43835 | bgbilling | Sleep   |  790 |       | NULL             |         0 |             0 |
| 119 | bill | localhost:43836 | bgbilling | Sleep   |  790 |       | NULL             |         0 |             0 |
| 120 | bill | localhost:43837 | bgbilling | Sleep   |  790 |       | NULL             |         0 |             0 |
| 121 | bill | localhost:43838 | bgbilling | Sleep   |  790 |       | NULL             |         0 |             0 |
| 122 | bill | localhost:43839 | bgbilling | Sleep   |  790 |       | NULL             |         0 |             0 |
| 123 | bill | localhost:43840 | bgbilling | Sleep   |  790 |       | NULL             |         0 |             0 |
| 124 | bill | localhost:43841 | bgbilling | Sleep   |  790 |       | NULL             |         0 |             0 |
| 125 | bill | localhost:43842 | bgbilling | Sleep   |  790 |       | NULL             |         0 |             0 |
| 126 | bill | localhost:43843 | bgbilling | Sleep   |  790 |       | NULL             |         0 |             0 |
| 127 | bill | localhost:43844 | bgbilling | Sleep   |  790 |       | NULL             |         0 |             0 |
| 128 | bill | localhost:43845 | bgbilling | Sleep   |  790 |       | NULL             |         0 |             0 |
| 129 | bill | localhost:43846 | bgbilling | Sleep   |  789 |       | NULL             |         0 |             0 |
| 130 | bill | localhost:43847 | bgbilling | Sleep   |  789 |       | NULL             |         0 |             0 |
| 131 | bill | localhost:43848 | bgbilling | Sleep   |  789 |       | NULL             |         0 |             0 |
| 132 | bill | localhost:43849 | bgbilling | Sleep   |  789 |       | NULL             |         0 |             0 |
| 133 | bill | localhost:43850 | bgbilling | Sleep   |  789 |       | NULL             |         0 |             0 |
| 134 | bill | localhost:43852 | bgbilling | Sleep   |  789 |       | NULL             |         0 |             0 |
| 135 | bill | localhost:43853 | bgbilling | Sleep   |  789 |       | NULL             |         0 |             0 |
| 136 | bill | localhost:43854 | bgbilling | Sleep   |  789 |       | NULL             |         0 |             0 |
| 137 | bill | localhost:43855 | bgbilling | Sleep   |  789 |       | NULL             |         0 |             0 |
| 138 | bill | localhost:43856 | bgbilling | Sleep   |  789 |       | NULL             |         0 |             0 |
| 139 | bill | localhost:43857 | bgbilling | Sleep   |  789 |       | NULL             |         0 |             0 |


./access.sh conpool забит такими сообщениями
Код:
jdbc:mysql://127.0.0.1/bgbilling?useUnicode=true&characterEncoding=UTF-8&allowUrlInLocalInfile=true&zeroDateTimeBehavior=convertToNull&jdbcCompliantTruncation=false&queryTimeoutKillsConnection=true&connectTimeout=1000, UserName=bill@localhost, MySQL Connector Java
        at ru.bitel.bgbilling.server.util.DefaultServerSetup$1.borrowObject(DefaultServerSetup.java:337)
        at ru.bitel.bgbilling.server.util.DatabaseConnectionPool$1.getConnection(DatabaseConnectionPool.java:30)
        at ru.bitel.bgbilling.server.util.DefaultServerSetup.getDBConnectionFromPool(DefaultServerSetup.java:581)
        at ru.ellcom.modules.inet.snmp.MacSnmpDeviceManager.init(MacSnmpDeviceManager.java:48)
        at ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime.reloadScripts(InetDeviceRuntime.java:307)
        at ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime.<init>(InetDeviceRuntime.java:232)
        at ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntimeMap.loadDevice(InetDeviceRuntimeMap.java:456)
        at ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntimeMap.loadDevice(InetDeviceRuntimeMap.java:466)
        at ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntimeMap.loadDevice(InetDeviceRuntimeMap.java:466)
        at ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntimeMap.load(InetDeviceRuntimeMap.java:251)
        at ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntimeMap.notify(InetDeviceRuntimeMap.java:96)
        at ru.bitel.bgbilling.kernel.event.LocalEventProcessor.request(LocalEventProcessor.java:240)
        at ru.bitel.bgbilling.kernel.event.EventProcessor.request(EventProcessor.java:893)
        at ru.bitel.bgbilling.kernel.event.EventProcessor.request(EventProcessor.java:862)
        at ru.bitel.bgbilling.modules.inet.runtime.InetApplication.reload(InetApplication.java:305)
        at ru.bitel.bgbilling.modules.inet.runtime.InetApplication.access$000(InetApplication.java:69)
        at ru.bitel.bgbilling.modules.inet.runtime.InetApplication$1$1.run(InetApplication.java:284)


в jstack'е черт ногу сломит.
Но вроде вот такого много
Код:
"dm-p-13-t-80" #328 prio=5 os_prio=0 tid=0x00007f94800ee000 nid=0x2825 waiting on condition [0x00007f9477b7a000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000000f633c590> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1088)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
   at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)
   at ru.bitel.common.worker.WorkerThread.run(WorkerThread.java:46)



Как можно поглядеть где именно я не закрываю соединения :?

Автор:  Phricker [ 05 авг 2015, 19:13 ]
Заголовок сообщения:  Re: Как посмотреть где я накосячил?

Хотя. Вроде нашел.

Автор:  stark [ 05 авг 2015, 19:46 ]
Заголовок сообщения:  Re: Как посмотреть где я накосячил?

так вот же ?
Цитата:
at ru.bitel.bgbilling.server.util.DefaultServerSetup.getDBConnectionFromPool(DefaultServerSetup.java:581)
at ru.ellcom.modules.inet.snmp.MacSnmpDeviceManager.init(MacSnmpDeviceManager.java:48)

Страница 1 из 1 Часовой пояс: UTC + 5 часов [ Летнее время ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/