当前位置:网站首页>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
边栏推荐
- In simple terms, interview surprise Edition
- Excel 中VBA脚本的简单应用
- Zero foundation entry polardb-x: build a highly available system and link the big data screen
- 算法面试经典100题,Android程序员最新职业规划
- USB host driver - UVC swap
- C # - realize serialization with Marshall class
- 系统性详解Redis操作Hash类型数据(带源码分析及测试结果)
- [translation] Digital insider. Selection process of kubecon + cloudnativecon in Europe in 2022
- An error occurs when installing MySQL: could not create or access the registry key needed for the
- Dark horse -- redis
猜你喜欢
思维导图+源代码+笔记+项目,字节跳动+京东+360+网易面试题整理
DaGAN论文解读
利用 clip-path 绘制不规则的图形
Using clip path to draw irregular graphics
Phoenix Architecture 3 - transaction processing
It's enough to read this article to analyze the principle in depth
Hudi vs Delta vs Iceberg
系统性详解Redis操作Hash类型数据(带源码分析及测试结果)
In simple terms, interview surprise Edition
Leetcode 30. 串联所有单词的子串
随机推荐
【翻译】Linkerd在欧洲和北美的采用率超过了Istio,2021年增长118%。
Interview assault 63: how to remove duplication in MySQL?
Dom 操作
激进技术派 vs 项目保守派的微服务架构之争
腾讯T2大牛亲自讲解,跳槽薪资翻倍
Swagger2 reports an error illegal DefaultValue null for parameter type integer
JDBC details
从sparse.csc.csr_matrix生成邻接矩阵
How to do smoke test
学习探索-使用伪元素清除浮动元素造成的高度坍塌
Use of map (the data of the list is assigned to the form, and the JSON comma separated display assignment)
Translation D28 (with AC code POJ 26:the nearest number)
LeetCode_格雷编码_中等_89.格雷编码
Alibaba data source Druid visual monitoring configuration
After solving 2961 user feedback, I made such a change
Information System Project Manager - Chapter VIII project quality management
LeetCode_ Double pointer_ Medium_ 61. rotating linked list
Phoenix Architecture 2 - accessing remote services
[infrastructure] deployment and configuration of Flink / Flink CDC (MySQL / es)
保证接口数据安全的10种方案