当前位置:网站首页>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
边栏推荐
- DOM operation
- Carte de réflexion + code source + notes + projet, saut d'octets + jd + 360 + tri des questions d'entrevue Netease
- 终于可以一行代码也不用改了!ShardingSphere 原生驱动问世
- Phoenix Architecture 3 - transaction processing
- 思维导图+源代码+笔记+项目,字节跳动+京东+360+网易面试题整理
- Elastic search indexes are often deleted [closed] - elastic search indexes gets deleted frequently [closed]
- LeetCode_双指针_中等_61. 旋转链表
- js实现力扣71题简化路径
- 测试用里hi
- Learn to explore - use pseudo elements to clear the high collapse caused by floating elements
猜你喜欢
思维导图+源代码+笔记+项目,字节跳动+京东+360+网易面试题整理
思維導圖+源代碼+筆記+項目,字節跳動+京東+360+網易面試題整理
Reflection and illegalaccessexception exception during application
Druid database connection pool details
Blue Bridge Cup microbial proliferation C language
腾讯T3手把手教你,真的太香了
Systematic and detailed explanation of redis operation hash type data (with source code analysis and test results)
蓝桥杯 微生物增殖 C语言
冒烟测试怎么做
Live broadcast today | the 2022 Hongji ecological partnership conference of "Renji collaboration has come" is ready to go
随机推荐
Tencent Android interview must ask, 10 years of Android development experience
Mind map + source code + Notes + project, ByteDance + JD +360+ Netease interview question sorting
潇洒郎: AttributeError: partially initialized module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipe
After solving 2961 user feedback, I made such a change
零基础入门PolarDB-X:搭建高可用系统并联动数据大屏
时钟轮在 RPC 中的应用
【翻译】云原生观察能力微调查。普罗米修斯引领潮流,但要了解系统的健康状况仍有障碍...
short i =1; I=i+1 and short i=1; Difference of i+=1
Mysql Information Schema 學習(一)--通用錶
Tensorflow2.0 自定义训练的方式求解函数系数
Problems encountered in using RT thread component fish
C # use Marshall to manually create unmanaged memory in the heap and use
Dark horse -- redis
Carte de réflexion + code source + notes + projet, saut d'octets + jd + 360 + tri des questions d'entrevue Netease
Yyds dry goods inventory leetcode question set 751 - 760
终于可以一行代码也不用改了!ShardingSphere 原生驱动问世
[translation] linkerd's adoption rate in Europe and North America exceeded istio, with an increase of 118% in 2021.
Use of deg2rad and rad2deg functions in MATLAB
Black Horse - - Redis Chapter
zabbix 代理服务器 与 zabbix-snmp 监控