Apache's prefork model led to many module initialization Fetion

2010-09-26  来源:本站原创  分类:Python  人气:160 

RT

Write a module that encapsulates what PyFetion, the purpose is to keep flying the letter is available and because of easy points.

In the module initialization when creating threads, log, query the database and then stop to see if there is information to be sent.

Was found very unstable, having read the next log

[Sun Sep 26 19:59:36 2010] [warn] child process 12374 still did not exit, sending a SIGTERM
Error in my_thread_global_end (): 1 threads didn't exit
[Sun Sep 26 19:59:38 2010] [notice] caught SIGTERM, shutting down
[Sun Sep 26 20:02:24 2010] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.5 with Suhosin-Patch mod_ssl/2.2.14 OpenSSL/0.9.8k mod_wsgi/2.8 Python / 2.6.5 configured - resuming normal operations
[Sun Sep 26 20:02:46 2010] [error] <SupervisorThread(SupervisorThread, started 140184746718992)> ('construct ...',)
[Sun Sep 26 20:02:49 2010] [error] <SupervisorThread(SupervisorThread, started 140184746718992)> ('login ...',)
[Sun Sep 26 20:02:54 2010] [error] <MessageThread(MessageThread, started 140184645531408)> ('message round',)
......
[Sun Sep 26 20:02:59 2010] [error] <SendSMSThread(SendSMSThread, started 140184637138704)> ('nomsg',)
[Sun Sep 26 20:03:04 2010] [error] <SendSMSThread(SendSMSThread, started 140184637138704)> ('nomsg',)
.......
[Sun Sep 26 20:03:24 2010] [error] <SupervisorThread(SupervisorThread, started 140184746718992)> ('construct ...',)
[Sun Sep 26 20:03:24 2010] [error] <HeartbeatThread(HeartbeatThread, started 140184721078032)> ('beat ~',)
[Sun Sep 26 20:03:24 2010] [error] <SendSMSThread(SendSMSThread, started 140184637138704)> ('nomsg',)
[Sun Sep 26 20:03:24 2010] [error] <HeartbeatThread(HeartbeatThread, started 140184721078032)> ('beat done',)

How it began initialized?

Later found out is because apache's prefork mode. Before the fork processes for each individual that the module is not initialized, so they initialize, resulting in the process of simultaneously n-log.

Now think in the end is to fly the letter made webservice, or simply switch to worker mode.

相关文章
  • Apache's prefork model led to many module initialization Fetion 2010-09-26

    RT Write a module that encapsulates what PyFetion, the purpose is to keep flying the letter is available and because of easy points. In the module initialization when creating threads, log, query the database and then stop to see if there is informat

  • Apache's prefork model led to several flight information module initialization 2010-09-26

    RT To write a module that encapsulates what PyFetion, the purpose of the letter is available try to keep flying, then there are easy points. Created when the module initialization thread, log in, and then kept the information to query the database to

  • Apache's prefork mode and worker model 2010-06-26

    prefork model this multi-processing module (MPM) implements a non-thread-based, pre-derived web server, it works similar to Apache 1.3. It is suitable not thread-safe libraries, the need to avoid threading system compatibility issues. It is requested

  • Concurrency control on the apache in prefork understanding and tuning parameters 2010-11-18

    Under an apache concurrent with linux is not very high, about the way to the 3K (actually handle http requests may only be 300 / s), common server problems will be different levels. Apache is mainly related to concurrency control and worker prefork t

  • About Apache (httpd) server, the use of anti-DDOS module mod_evasive Help 2011-03-21

    http://www.docin.com/p-83334545.html http://www.linuxsir.org/main/node/244 Tests show that: When mod_evasive time in the normal sealing of an ip, apache logs will still have access to records; mod_evasive's official address: http://www.zdziarski.com/

  • Apache installation is complete, add the mod_proxy module 2011-07-06

    apxs is to compile and install Apache HTTP Server extension tools for compiling one or more source or object code file is dynamically shared object, so you can use the LoadModule directive to load at run time into the Apache server. 1 into the apache

  • Apache的prefork模式和worker模式 2014-02-02

    prefork模式 这个多路处理模块(MPM)实现了一个非线程型的.预派生的web服务器,它的工作方式类似于Apache 1.3.它适合于没有线程安全库,需要避免线程兼容性问题的系统.它是要求将每个请求相互独立的情况下最好的MPM,这样若一个请求出现问题就不会影响到其他请求. 这个MPM具有很强的自我调节能力,只需要很少的配置指令调整.最重要的是将MaxClients设置为一个足够大的数值以处理潜在的请求高峰,同时又不能太大,以致需要使用的内存超出物理内存的大小. worker模式 此多路处理模

  • facebook technology related to architecture 2010-09-21

    Talent Study sparse shallow, raised this problem is to start a discussion, hope you Neng good in the areas of Ziji li right in Facebook may Cai Yong of a Jishu Huozhejiagou Programme or optimization Fangfa , Be your own Lunshu. According to September

  • Apache working model of the article 2010-04-01

    As the most popular Apache web server, it is necessary in-depth look, start now, with a lot of questions to write Apache series of blog: First: Apache's operating mode, the process model or process thread model or mix and match the thread model? Apac

  • front desk agent distribution weblogic cluster apache error: error module libhttpd.dll, error analysis and solutions address 0x0001c0a2 2010-04-14

    2003 error: Faulting application Apache.exe, version 2.0.63.200, faulting module libhttpd.dll, version 2.0.63.200, fault address 0x0001c0a2 apache's error: [Sat Mar 07 16:10:26 2009] [notice] Parent: Received restart signal - Restarting the server. [

  • Apache performance tuning 2010-05-21

    In bottles and apache 2, you can use the built-in tools to test the next ab, such as the first test comes with the default home page under apache: . / Ab c -1000-n 10000 http://xxxx/index.html 1000 requests each issue, there were 10,000 Later introdu

  • This article comes from the Apache configuration reference: Development Institute http://edu.codepub.com Original link: http://edu.codepub.com/2009 2010-06-13

    1. What is Apache? Apache, an open source HTTP server, you can run on most operating systems, because of its multi-platform and security which are widely used, is the most popular Web server software one. Apache was originally developed by the Univer

  • The web server in the IO model 2010-08-17

    select the file descriptor data trigger level of the maximum limit of 1024 poll and select the same no maximum limit SIGIO edge trigger level + epoll ready to inform the edge of event-based approach linux2.6 basically the same in FreeBSD kqueue epoll

  • Apache see the current number of connections and limit the number of connections 2010-11-04

    Cause: a server online, there is always recent visit to a very slow to happen, click on a link to more than 2 seconds to open, according to our estimates for the number of visitors, the server should not lead so slow to respond to needs for analysis

  • [Change] linux Apache status statement under the common view 2010-07-14

    http://www.cnblogs.com/rooney/archive/2009/08/20/1550609.html Apache linux status statement under the common view Collection of commonly used linux apache state to view statement: 1, see Apache number of concurrent requests and TCP connection state:

  • Apache httpd.conf Xiangjie 2010-09-25

    Apache server configuration file located in / usr / local / apache / conf / directory, the traditional use of the three configuration files httpd.conf, access.conf and srm.conf, to configure the Apache server's behavior. httpd.conf server configurati

  • Linux, Tomcat and the Apache Web server integration 2010-12-30

    Linux, Tomcat and the Apache Web server consolidation 1 Introduction Web-based technology, Internet / Intranet in recent years has been widely used, Intranet is a TCP / IP protocol-based, enterprise Web as the core network, users low-cost, easy to us

  • Apache apxs tool used to add modules (no need to compile and install apache) 2011-06-03

    Transfer: http://www.cublog.cn/u3/105800/showart_2099945.html Here is the apache apxs tool to add modules Such as adding a module: LoadModule cgi_module libexec / mod_cgi.so LoadModule cgid_module libexec / mod_cgid.so Add method: To install addition

  • apache php模块整合操作指南 2015-01-11

    本文将详细介绍Linux下Apache.php3.MySQL的整合的相关问题的解决方法,需要的朋友可以参考下 apache的版本: httpd-2.2.21-win32-x86-no_ssl php的版本: php-5[1].3.8-Win32-VC9-x86 (一) 准备工作 1.先找在D:/amp/php中找到php.ini-development这个文件,然后把它改成php.ini这个文件名 2.用记事本,或editplus将其打开 (二)操作步骤: 1.告诉php所用的扩展模块所在位置

  • apache mpm 2014-10-14

    There are a number of MPM modules, but by far the most widely used (at least on *nix platforms) are the three main ones: prefork, worker, and event. Essentially, they represent the evolution of the Apache web server, and the different ways that the s