النتائج 1 إلى 3 من 3

الموضوع: ارجو ضبط الاباتشي لي

  1. #1
    عضو نشيط
    تاريخ التسجيل
    Sep 2006
    المشاركات
    97

    ارجو ضبط الاباتشي لي



    السلام عليكم

    اخواني لدية سيرفر vps وعلية موقع واحد . الموقع يحتوي العديد من الملفات للداون لوود .

    الموقع كان على في بي سي برام 512 ميجا وكان كل شيء تمام

    اشتريت vps اخر برام اقوى 2 جيجا . ولكن اصبحت مشكلة هي ان الاباتشي يستهلك الرام كامل في ساعات معينه من النهار .

    فمثلا احيانا لديه فقط 4 زوار رغم ذلك اجد استهلاك الرام يصل الي 1 جيجا واحيانا 15 زائر ولكن الرام كله قد انتهى ويتوقف السيرفر لحتى اعد تشغيل الاباتشي مره اخرة ريستارت.

    فامر غريب كان الموقع 512 ميجا تمام والان 2 جيجا واوجة مشكلة استهلاك الرام . فاتوقع المشكلة تكمن بظبط الاباتشي .

    استخدم لوحة تحكم directadmin وهذا ملف الاعدادت على ما اتوقع
    httpd-mpm.conf

    يحتوي .
    #
    # Server-Pool Management (MPM specific)
    #

    #
    # PidFile: The file in which the server should record its process
    # identification number when it starts.
    #
    # Note that this is the default PidFile for most MPMs.
    #
    <IfModule !mpm_netware_module>
    PidFile "/var/run/httpd.pid"
    </IfModule>

    #
    # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
    #
    <IfModule !mpm_winnt_module>
    <IfModule !mpm_netware_module>
    LockFile /var/logs/accept.lock
    </IfModule>
    </IfModule>

    #
    # Only one of the below sections will be relevant on your
    # installed httpd. Use "apachectl -l" to find out the
    # active mpm.
    #

    # prefork MPM
    # StartServers: number of server processes to start
    # MinSpareServers: minimum number of server processes which are kept spare
    # MaxSpareServers: maximum number of server processes which are kept spare
    # MaxClients: maximum number of server processes allowed to start
    # MaxRequestsPerChild: maximum number of requests a server process serves
    <IfModule mpm_prefork_module>
    StartServers 5
    MinSpareServers 5
    MaxSpareServers 10
    ServerLimit 450
    MaxClients 450
    MaxRequestsPerChild 10000
    </IfModule>

    # worker MPM
    # StartServers: initial number of server processes to start
    # MaxClients: maximum number of simultaneous client connections
    # MinSpareThreads: minimum number of worker threads which are kept spare
    # MaxSpareThreads: maximum number of worker threads which are kept spare
    # ThreadsPerChild: constant number of worker threads in each server process
    # MaxRequestsPerChild: maximum number of requests a server process serves
    <IfModule mpm_worker_module>
    StartServers 2
    ServerLimit 450
    MaxClients 450
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadsPerChild 25
    MaxRequestsPerChild 10000
    </IfModule>

    # BeOS MPM
    # StartThreads: how many threads do we initially spawn?
    # MaxClients: max number of threads we can have (1 thread == 1 client)
    # MaxRequestsPerThread: maximum number of requests each thread will process
    <IfModule mpm_beos_module>
    StartThreads 10
    MaxClients 50
    MaxRequestsPerThread 10000
    </IfModule>

    # NetWare MPM
    # ThreadStackSize: Stack size allocated for each worker thread
    # StartThreads: Number of worker threads launched at server startup
    # MinSpareThreads: Minimum number of idle threads, to handle request spikes
    # MaxSpareThreads: Maximum number of idle threads
    # MaxThreads: Maximum number of worker threads alive at the same time
    # MaxRequestsPerChild: Maximum number of requests a thread serves. It is
    # recommended that the default value of 0 be set for this
    # directive on NetWare. This will allow the thread to
    # continue to service requests indefinitely.
    <IfModule mpm_netware_module>
    ThreadStackSize 65536
    StartThreads 250
    MinSpareThreads 25
    MaxSpareThreads 250
    MaxThreads 1000
    MaxRequestsPerChild 10000
    MaxMemFree 100
    </IfModule>

    # OS/2 MPM
    # StartServers: Number of server processes to maintain
    # MinSpareThreads: Minimum number of idle threads per process,
    # to handle request spikes
    # MaxSpareThreads: Maximum number of idle threads per process
    # MaxRequestsPerChild: Maximum number of connections per server process
    <IfModule mpm_mpmt_os2_module>
    StartServers 2
    MinSpareThreads 5
    MaxSpareThreads 10
    MaxRequestsPerChild 10000
    </IfModule>


    وغريب ان ملف my.cnf لا يحتوي شيء فقط
    [mysqld]
    local-infile=0

    موقعي لايزيد عدد المتواجدين فيه في وقت واحد عن 70 زائر في احسن الظروف . وبه داونلوود كثير . ولكن 2 جيجا ميموري ومسموح لي 1 جيجا زيادة burst ورغم ذلك مش ملحق ع الاباتشي .





    __________________
    ليس كل ما يتمنى المرء يدركة


  2. #2


    غير في
    MaxRequestsPerChild 10000
    الى
    MaxRequestsPerChild 0





    __________________
    احصل على موقعك الان مجاناً
    www.201mb.com

  3. #3
    عضو نشيط
    تاريخ التسجيل
    Sep 2006
    المشاركات
    97


    شكرا لك

    هل من شرح لهذه الاعدادت وما اهميتها

    #
    # This configuration file reflects default settings for Apache HTTP Server.
    #
    # You may change these, but chances are that you may not need to.
    #

    #
    # Timeout: The number of seconds before receives and sends time out.
    #
    Timeout 60

    #
    # KeepAlive: Whether or not to allow persistent connections (more than
    # one request per connection). Set to "Off" to deactivate.
    #
    KeepAlive On

    #
    # MaxKeepAliveRequests: The maximum number of requests to allow
    # during a persistent connection. Set to 0 to allow an unlimited amount.
    # We recommend you leave this number high, for maximum performance.
    #
    MaxKeepAliveRequests 100

    #
    # KeepAliveTimeout: Number of seconds to wait for the next request from the
    # same client on the same connection.
    #
    KeepAliveTimeout 1

    #
    # UseCanonicalName: Determines how Apache constructs self-referencing
    # URLs and the SERVER_NAME and SERVER_PORT variables.
    # When set "Off", Apache will use the Hostname and Port supplied
    # by the client. When set "On", Apache will use the value of the
    # ServerName directive.
    #
    UseCanonicalName Off

    #
    # AccessFileName: The name of the file to look for in each directory
    # for additional configuration directives. See also the AllowOverride
    # directive.
    #
    AccessFileName .htaccess

    #
    # ServerTokens
    # This directive configures what you return as the Server HTTP response
    # Header. The default is 'Full' which sends information about the OS-Type
    # and compiled in modules.
    # Set to one of: Full | OS | Minor | Minimal | Major | Prod
    # where Full conveys the most information, and Prod the least.
    #
    ServerTokens Major

    #
    # Optionally add a line containing the server version and virtual host
    # name to server-generated pages (internal error documents, FTP directory
    # listings, mod_status and mod_info output etc., but not CGI generated
    # documents or custom error documents).
    # Set to "EMail" to also include a mailto: link to the ServerAdmin.
    # Set to one of: On | Off | EMail
    #
    ServerSignature On

    #
    # HostnameLookups: Log the names of clients or just their IP addresses
    # e.g., www.apache.org (on) or 204.62.129.132 (off).
    # The default is off because it'd be overall better for the net if people
    # had to knowingly turn this feature on, since enabling it means that
    # each client request will result in AT LEAST one lookup request to the
    # nameserver.
    #
    HostnameLookups Off




    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>





    __________________
    ليس كل ما يتمنى المرء يدركة





ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •  

أضف موقعك هنا| اخبار السيارات | حراج | شقق للايجار في الكويت | بيوت للبيع في الكويت | دليل الكويت العقاري | مقروء | شركة كشف تسربات المياه | شركة عزل اسطح بالرياض | عزل فوم بالرياض| عزل اسطح بالرياض | كشف تسربات المياة بالرياض | شركة عزل اسطح بالرياض