registration of device not mandatory to update into database and python script crashes after 500 devices

Yogesh7 years ago

Hello Anton,

Ref 1 : https://www.traccar.org/forums/topic/limitation-of-server-for-scalability/
Ref 2 : https://github.com/tananaev/traccar/blob/master/tools/test-performance.py

I was trying to understand test-performance.py

I found that python script crashes if I set devices more than 500. I am unable to understand the error ( I am new to python)

C:\Users\Yogesh\PycharmProjects\Cartest\venv\Scripts\python.exe C:/Users/Yogesh/PycharmProjects/Cartest/CT.py
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1064)(), <TaskWakeupMethWrapper object at 0x02D16570>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1628)(), <TaskWakeupMethWrapper object at 0x02D5A1D0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1632)(), <TaskWakeupMethWrapper object at 0x02D5A2B0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1636)(), <TaskWakeupMethWrapper object at 0x02D5A390>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1640)(), <TaskWakeupMethWrapper object at 0x02D5A470>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1644)(), <TaskWakeupMethWrapper object at 0x02D5A550>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1648)(), <TaskWakeupMethWrapper object at 0x02D5A630>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1652)(), <TaskWakeupMethWrapper object at 0x02D5A710>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1660)(), <TaskWakeupMethWrapper object at 0x02D5A8D0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1664)(), <TaskWakeupMethWrapper object at 0x02D5A9B0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1668)(), <TaskWakeupMethWrapper object at 0x02D5AA90>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1672)(), <TaskWakeupMethWrapper object at 0x02D5AB70>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1676)(), <TaskWakeupMethWrapper object at 0x02D5AC50>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1680)(), <TaskWakeupMethWrapper object at 0x02D5AD30>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1684)(), <TaskWakeupMethWrapper object at 0x02D5AE10>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1688)(), <TaskWakeupMethWrapper object at 0x02D5AEF0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1692)(), <TaskWakeupMethWrapper object at 0x02D5AFF0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1696)(), <TaskWakeupMethWrapper object at 0x02D600D0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1700)(), <TaskWakeupMethWrapper object at 0x02D601B0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1704)(), <TaskWakeupMethWrapper object at 0x02D60290>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1708)(), <TaskWakeupMethWrapper object at 0x02D60370>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1712)(), <TaskWakeupMethWrapper object at 0x02D60450>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1716)(), <TaskWakeupMethWrapper object at 0x02D60530>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1720)(), <TaskWakeupMethWrapper object at 0x02D60610>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1724)(), <TaskWakeupMethWrapper object at 0x02D606F0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1728)(), <TaskWakeupMethWrapper object at 0x02D607D0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1732)(), <TaskWakeupMethWrapper object at 0x02D608B0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1736)(), <TaskWakeupMethWrapper object at 0x02D60990>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1740)(), <TaskWakeupMethWrapper object at 0x02D60A70>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1744)(), <TaskWakeupMethWrapper object at 0x02D60B50>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1752)(), <TaskWakeupMethWrapper object at 0x02D60D10>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1760)(), <TaskWakeupMethWrapper object at 0x02D60ED0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1764)(), <TaskWakeupMethWrapper object at 0x02D60FB0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1768)(), <TaskWakeupMethWrapper object at 0x02D680B0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1772)(), <TaskWakeupMethWrapper object at 0x02D68190>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1776)(), <TaskWakeupMethWrapper object at 0x02D68270>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1780)(), <TaskWakeupMethWrapper object at 0x02D68350>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1784)(), <TaskWakeupMethWrapper object at 0x02D68430>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1788)(), <TaskWakeupMethWrapper object at 0x02D68510>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1792)(), <TaskWakeupMethWrapper object at 0x02D685F0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1796)(), <TaskWakeupMethWrapper object at 0x02D686D0>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BaseEventLoop.create_connection() running at C:\Users\Yogesh\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py:764> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_connect_done(1800)(), <TaskWakeupMethWrapper object at 0x02D687B0>()]>>

Process finished with exit code 0

Based on the discussion in the link below and test-performance.py and my understanding
https://www.traccar.org/forums/topic/limitation-of-server-for-scalability/

You do not need a device to be registered for it to write data in the database. Is that true?

Thanks in advance.

Anton Tananaev7 years ago

You need device to be registered, but there is also configuration option to automatically register unknown devices.

Yogesh7 years ago

So the performance tester make a use of auto registering device. Right? Any way to disable it ?

Also request you to give a word on why does the python script crash when we use 500 plus devices?
I wish to test 100K+ devices like you tested while doing performance testing.

Thanks.

Anton Tananaev7 years ago

The script uses same device id for all device connections.