当前位置:网站首页>mod_ WSGI + pymssql path SQL server seat
mod_ WSGI + pymssql path SQL server seat
2022-07-06 19:50:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack .
by pymssql access SQL Server moment , directly python Implementation without problems . by mod_wsgi and Apache When deployed . All requests are found hang Then query the database .
adopt google Found the answer , thank google, Please refer to :https://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_Simplified_GIL_State_API
Briefly ,mod_wsgi For each virtual host and app mount point Create a sub interpreter.python There is a famous GIL, Through C extension Visit GIL State when , There is only the first sub interpreter To work properly , Suppose you use the possible sub interpreter May cause deadlock or crash, because pymssql It's a C extension So there will be this problem , The solution is . Add configuration items :
WSGIApplicationGroup %{GLOBAL}
Force this app Use the first one sub interpreter, bring GIL Normal work . After finishing ,mod_wsgi everything ok.
Copyright notice : This article is an original blog article , Blog , Without consent , Shall not be reproduced .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/117139.html Link to the original text :https://javaforall.cn
边栏推荐
猜你喜欢
Spark foundation -scala
[infrastructure] deployment and configuration of Flink / Flink CDC (MySQL / es)
学习打卡web
DaGAN论文解读
Teach you to learn JS prototype and prototype chain hand in hand, a tutorial that monkeys can understand
理解 YOLOV1 第二篇 预测阶段 非极大值抑制(NMS)
蓝桥杯 微生物增殖 C语言
利用 clip-path 绘制不规则的图形
手把手教你学会js的原型与原型链,猴子都能看懂的教程
潇洒郎: AttributeError: partially initialized module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipe
随机推荐
转让malloc()该功能后,发生了什么事内核?附malloc()和free()实现源
The "white paper on the panorama of the digital economy" has been released with great emphasis on the digitalization of insurance
Mind map + source code + Notes + project, ByteDance + JD +360+ Netease interview question sorting
VMware virtual machine cannot open the kernel device "\.\global\vmx86"
HDU 1026 search pruning problem within the labyrinth of Ignatius and the prince I
某东短信登录复活 安装部署教程
Mysql Information Schema 学习(二)--Innodb表
Selenium advanced operations
MySQL must know and learn
About image reading and processing, etc
LeetCode_ Gray code_ Medium_ 89. Gray code
Vscode debug run fluent message: there is no extension for debugging yaml. Should we find yaml extensions in the market?
The slave i/o thread stops because master and slave have equal MySQL serv
How to access localhost:8000 by mobile phone
[calculating emotion and thought] floor sweeper, typist, information panic and Oppenheimer
From spark csc. csr_ Matrix generate adjacency matrix
[translation] micro survey of cloud native observation ability. Prometheus leads the trend, but there are still obstacles to understanding the health of the system
Example of applying fonts to flutter
Configuration and simple usage of the EXE backdoor generation tool quasar
Hudi vs Delta vs Iceberg