简体   繁体   English

sqlalchemy apache mod_wsgi与金字塔崩溃

[英]sqlalchemy apache mod_wsgi crash with pyramid

I am running a basic Pyramid application with apache mod_Wsgi. 我正在使用apache mod_Wsgi运行基本的Pyramid应用程序。 My application setup seems Ok since I can access the home Pyramid template under Apache. 我的应用程序设置似乎还可以,因为我可以在Apache下访问家庭金字塔模板。

As soon as I issue a request to this app, the apache process crashes with 'premature end of script headers - segmentation fault'. 一旦我对此应用程序发出请求,apache进程就会因“脚本头过早结束-分段错误”而崩溃。 This is how the sqlalchemy code looks for the request. 这是sqlalchemy代码查找请求的方式。 (I've added this code to _ views. _py itself since I am trying to create a RESTful framework without the use of models.) (我已将此代码添加到_ 视图 。_py本身是因为我试图创建不使用模型的RESTful框架。)

try:
            print >> sys.stderr, 'entering sql execute'
            value=session.execute(s)
            for row in value:
                    listofclients.append(row[0])
            return listofclients
            session.close()
    except exc.SQLAlchemyError, exc:
            print >> sys.stderr, exc.message

I can see 'entering sql execute' in the apache error log. 我可以在apache错误日志中看到“输入sql执行”。 Immediately after which the process crashes. 此后立即崩溃。 Commenting out the execute statement and returning sample values works. 注释掉execute语句并返回示例值。 Running this app under pserve provided by pyramid works like a charm. 在金字塔提供的保护下运行此应用程序就像一个魅力。

Any help why Apache does not like the execute statment? 对Apache为什么不喜欢执行语句有帮助吗? Let me know if you need any other information. 让我知道您是否需要其他信息。

Following Graham's suggestion and carefully examining the GDB backtrace of the crashed process, it turns out there was a ldap module which was interfering with the cx_Oracle connect string. 遵循Graham的建议并仔细检查了崩溃进程的GDB回溯,结果发现存在一个ldap模块,该模块正在干扰cx_Oracle连接字符串。 the ldap_search_str() was the culprit. ldap_search_str()是元凶。

Disabling the ldap modules fixed the issue. 禁用ldap模块可解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM