getting error when multithreader program access data .
Exception in thread Thread-2:
ProgrammingError: (2014, \"Commands out of sync; you can\'t run this co
Thanks to your few informations, I can only guess.
Probably you access the database from several threads without locking. That's bad.
You should hold a lock to a threading.Lock() or threading.RLock() while accessing your DB. This prevents several threads from interfering with other thread's actions.