当前位置:网站首页>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 操作
- 颜色(color)转换为三刺激值(r/g/b)(干股)
- 测试用里hi
- After solving 2961 user feedback, I made such a change
- 【翻译】Linkerd在欧洲和北美的采用率超过了Istio,2021年增长118%。
- [calculating emotion and thought] floor sweeper, typist, information panic and Oppenheimer
- 腾讯T3手把手教你,真的太香了
- Alibaba data source Druid visual monitoring configuration
- [play with Linux] [docker] MySQL installation and configuration
- Finally, there is no need to change a line of code! Shardingsphere native driver comes out
猜你喜欢
理解 YOLOV1 第二篇 预测阶段 非极大值抑制(NMS)
如何自定义动漫头像?这6个免费精品在线卡通头像生成器,看一眼就怦然心动!
It's super detailed in history. It's too late for you to read this information if you want to find a job
Mind map + source code + Notes + project, ByteDance + JD +360+ Netease interview question sorting
DaGAN论文解读
Leetcode 30. Concatenate substrings of all words
Systematic and detailed explanation of redis operation hash type data (with source code analysis and test results)
Druid database connection pool details
10 schemes to ensure interface data security
今日直播 | “人玑协同 未来已来”2022弘玑生态伙伴大会蓄势待发
随机推荐
测试用里hi
A popular explanation will help you get started
Hudi vs Delta vs Iceberg
腾讯Android面试必问,10年Android开发经验
Problems encountered in using RT thread component fish
Dark horse -- redis
CF960G - Bandit Blues(第一类斯特林数+OGF)
LeetCode_ Gray code_ Medium_ 89. Gray code
Mind map + source code + Notes + project, ByteDance + JD +360+ Netease interview question sorting
VMware virtual machine cannot open the kernel device "\.\global\vmx86"
About image reading and processing, etc
学习探索-无缝轮播图
Interpretation of Dagan paper
[calculating emotion and thought] floor sweeper, typist, information panic and Oppenheimer
手把手教你学会js的原型与原型链,猴子都能看懂的教程
Fast power template for inverse element, the role of inverse element and example [the 20th summer competition of Shanghai University Programming League] permutation counting
10 schemes to ensure interface data security
MySQL information Schema Learning (i) - - General table
[translation] micro survey of cloud native observation ability. Prometheus leads the trend, but there are still obstacles to understanding the health of the system
Information System Project Manager - Chapter VIII project quality management