当前位置:网站首页>mod_wsgi + pymssql通路SQL Server座
mod_wsgi + pymssql通路SQL Server座
2022-07-06 11:47:00 【全栈程序员站长】
大家好,又见面了,我是全栈君。
靠pymssql通路SQL Server时刻,直接地python没有问题的执行。靠mod_wsgi和Apache当部署。所有请求被发现hang然后数据库查询。
通过google查到了答案,感谢google,具体描写叙述请见:https://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_Simplified_GIL_State_API
简要说一下,mod_wsgi针对每一个virtual host和app mount point创建一个sub interpreter。python中有个著名的GIL,在通过C extension訪问GIL State时,仅仅有第一个sub interpreter才干够正常工作,假设使用兴许的sub interpreter会导致死锁或crash,由于pymssql是一个C extension所以会有这个问题,解决方式是。加入配置项:
WSGIApplicationGroup %{GLOBAL}强制该app使用第一个sub interpreter,使得GIL正常工作。改完后,mod_wsgi一切ok。
版权声明:本文博客原创文章,博客,未经同意,不得转载。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/117139.html原文链接:https://javaforall.cn
边栏推荐
猜你喜欢

【翻译】云原生观察能力微调查。普罗米修斯引领潮流,但要了解系统的健康状况仍有障碍...

学习探索-使用伪元素清除浮动元素造成的高度坍塌

Blue Bridge Cup microbial proliferation C language
In depth analysis, Android interview real problem analysis is popular all over the network

How to access localhost:8000 by mobile phone

腾讯Android面试必问,10年Android开发经验

Phoenix Architecture 3 - transaction processing

DaGAN论文解读

反射及在运用过程中出现的IllegalAccessException异常

Cereals Mall - Distributed Advanced p129~p339 (end)
随机推荐
【翻译】Linkerd在欧洲和北美的采用率超过了Istio,2021年增长118%。
CF960G - Bandit Blues(第一类斯特林数+OGF)
After solving 2961 user feedback, I made such a change
[translation] Digital insider. Selection process of kubecon + cloudnativecon in Europe in 2022
终于可以一行代码也不用改了!ShardingSphere 原生驱动问世
short i =1; I=i+1 and short i=1; Difference of i+=1
凤凰架构2——访问远程服务
Carte de réflexion + code source + notes + projet, saut d'octets + jd + 360 + tri des questions d'entrevue Netease
Use of map (the data of the list is assigned to the form, and the JSON comma separated display assignment)
【翻译】云原生观察能力微调查。普罗米修斯引领潮流,但要了解系统的健康状况仍有障碍...
Reflection and illegalaccessexception exception during application
企业精益管理体系介绍
Tensorflow2.0 自定义训练的方式求解函数系数
1805. 字符串中不同整数的数目
ZABBIX proxy server and ZABBIX SNMP monitoring
时钟轮在 RPC 中的应用
激进技术派 vs 项目保守派的微服务架构之争
颜色(color)转换为三刺激值(r/g/b)(干股)
121. 买卖股票的最佳时机
通俗的讲解,带你入门协程