Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/298.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Django(postgresql)和#x2B;lighttpd。线程和python的任何问题';什么是postgresql驱动程序?_Python_Django_Postgresql_Thread Safety_Lighttpd - Fatal编程技术网

Django(postgresql)和#x2B;lighttpd。线程和python的任何问题';什么是postgresql驱动程序?

Django(postgresql)和#x2B;lighttpd。线程和python的任何问题';什么是postgresql驱动程序?,python,django,postgresql,thread-safety,lighttpd,Python,Django,Postgresql,Thread Safety,Lighttpd,我想使用FastCGI在lighttpd上部署我的Django应用程序(使用postgresql作为数据库)。 对于postgresql,我看到Django有两个后端可用“postgresql\u psycopg2”和“postgresql”。 我的问题是,lighttpd作为一个线程服务器,这种后端有什么问题吗?它们是线程安全的吗?哪一个更好/推荐? 我的问题是因为我读到了postgresql的python驱动程序不是线程安全的(现在不记得在哪里) LE:在进一步阅读之后,我发现线程问题仅在运

我想使用FastCGI在lighttpd上部署我的Django应用程序(使用postgresql作为数据库)。
对于postgresql,我看到Django有两个后端可用“postgresql\u psycopg2”和“postgresql”。
我的问题是,lighttpd作为一个线程服务器,这种后端有什么问题吗?它们是线程安全的吗?哪一个更好/推荐?
我的问题是因为我读到了postgresql的python驱动程序不是线程安全的(现在不记得在哪里)

LE:在进一步阅读之后,我发现线程问题仅在运行
manage.py method=threaded
时存在,而在运行
manage.py method=prefork
时不存在,因为这是FastCGI进程绑定而不是Web服务器绑定(即:不管Web服务器是如何运行的、线程化的还是基于进程的,而只关心fastcgi服务器是如何运行的)
无论如何,在这种情况下,无论是线程还是预POSK,Milen A.Radev如何回答postgresql\u psycopg2都是线程安全的。