-1

I have a Dedicated server from Hetzner Datacenter which i use it as Download server(file host) :

  • Intel® Core™ i7-2600 Quadcore incl. Hyper-Threading Technology
  • 32 GB DDR3 RAM
  • 100mb/s bandwidth
  • Centos 6.3
  • Apache/2.2.24 (Unix)

I am using prefork.c and i set that like this :

<IfModule prefork.c>
StartServers 5
MinSpareServers 10
MaxSpareServers 15
ServerLimit 4000
MaxClients 4000
MaxRequestsPerChild 0
</IfModule>

but when the traffic goes up, Apache server freezes until it gets restarted. where the problem is?

output of : sysctl -a

kernel.sched_child_runs_first = 0
kernel.sched_min_granularity_ns = 4000000
kernel.sched_latency_ns = 20000000
kernel.sched_wakeup_granularity_ns = 4000000
kernel.sched_tunable_scaling = 1
kernel.sched_features = 3183
kernel.sched_migration_cost = 500000
kernel.sched_nr_migrate = 32
kernel.sched_time_avg = 1000
kernel.sched_shares_window = 10000000
kernel.timer_migration = 1
kernel.sched_rt_period_us = 1000000
kernel.sched_rt_runtime_us = 950000
kernel.sched_compat_yield = 0
kernel.sched_autogroup_enabled = 0
kernel.sched_cfs_bandwidth_slice_us = 5000
kernel.panic = 0
kernel.exec-shield = 1
kernel.core_uses_pid = 1
kernel.core_pattern = |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e
kernel.core_pipe_limit = 4
kernel.tainted = 0
kernel.real-root-dev = 0
kernel.print-fatal-signals = 0
kernel.ctrl-alt-del = 0
kernel.ftrace_enabled = 1
kernel.stack_tracer_enabled = 0
kernel.ftrace_dump_on_oops = 0
kernel.modprobe = /sbin/modprobe
kernel.modules_disabled = 0
kernel.kexec_load_disabled = 0
kernel.hotplug =
kernel.acct = 4    2    30
kernel.sysrq = 0
kernel.cad_pid = 1
kernel.threads-max = 508572
kernel.random.poolsize = 4096
kernel.random.entropy_avail = 305
kernel.random.read_wakeup_threshold = 64
kernel.random.write_wakeup_threshold = 128
kernel.random.boot_id = de5e6691-98e5-4dca-990d-310b2a0710d7
kernel.random.uuid = 83eb9637-d234-4150-b088-5092f2f41b7e
kernel.usermodehelper.bset = 4294967295    4294967295
kernel.usermodehelper.inheritable = 4294967295    4294967295
kernel.overflowuid = 65534
kernel.overflowgid = 65534
kernel.pid_max = 32768
kernel.panic_on_oops = 1
kernel.printk = 4    4    1    7
kernel.printk_ratelimit = 5
kernel.printk_ratelimit_burst = 10
kernel.printk_delay = 0
kernel.dmesg_restrict = 0
kernel.kptr_restrict = 1
kernel.ngroups_max = 65536
kernel.watchdog = 1
kernel.watchdog_thresh = 60
kernel.softlockup_panic = 0
kernel.nmi_watchdog = 1
kernel.unknown_nmi_panic = 0
kernel.panic_on_unrecovered_nmi = 0
kernel.panic_on_io_nmi = 0
kernel.bootloader_type = 113
kernel.bootloader_version = 1
kernel.kstack_depth_to_print = 12
kernel.io_delay_type = 0
kernel.randomize_va_space = 2
kernel.acpi_video_flags = 0
kernel.hung_task_panic = 0
kernel.hung_task_check_count = 4194304
kernel.hung_task_timeout_secs = 120
kernel.hung_task_warnings = 10
kernel.compat-log = 1
kernel.max_lock_depth = 1024
kernel.poweroff_cmd = /sbin/poweroff
kernel.keys.maxkeys = 200
kernel.keys.maxbytes = 20000
kernel.keys.root_maxkeys = 200
kernel.keys.root_maxbytes = 20000
kernel.keys.gc_delay = 300
kernel.slow-work.min-threads = 2
kernel.slow-work.max-threads = 8
kernel.slow-work.vslow-percentage = 50
kernel.perf_event_paranoid = 1
kernel.perf_event_mlock_kb = 516
kernel.perf_event_max_sample_rate = 100000
kernel.blk_iopoll = 1
kernel.sched_domain.cpu0.domain0.min_interval = 1
kernel.sched_domain.cpu0.domain0.max_interval = 2
kernel.sched_domain.cpu0.domain0.busy_idx = 0
kernel.sched_domain.cpu0.domain0.idle_idx = 0
kernel.sched_domain.cpu0.domain0.newidle_idx = 0
kernel.sched_domain.cpu0.domain0.wake_idx = 0
kernel.sched_domain.cpu0.domain0.forkexec_idx = 0
kernel.sched_domain.cpu0.domain0.busy_factor = 64
kernel.sched_domain.cpu0.domain0.imbalance_pct = 110
kernel.sched_domain.cpu0.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu0.domain0.flags = 687
kernel.sched_domain.cpu0.domain0.name = SIBLING
kernel.sched_domain.cpu0.domain1.min_interval = 1
kernel.sched_domain.cpu0.domain1.max_interval = 4
kernel.sched_domain.cpu0.domain1.busy_idx = 2
kernel.sched_domain.cpu0.domain1.idle_idx = 0
kernel.sched_domain.cpu0.domain1.newidle_idx = 0
kernel.sched_domain.cpu0.domain1.wake_idx = 0
kernel.sched_domain.cpu0.domain1.forkexec_idx = 0
kernel.sched_domain.cpu0.domain1.busy_factor = 64
kernel.sched_domain.cpu0.domain1.imbalance_pct = 125
kernel.sched_domain.cpu0.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu0.domain1.flags = 4655
kernel.sched_domain.cpu0.domain1.name = MC
kernel.sched_domain.cpu1.domain0.min_interval = 1
kernel.sched_domain.cpu1.domain0.max_interval = 2
kernel.sched_domain.cpu1.domain0.busy_idx = 0
kernel.sched_domain.cpu1.domain0.idle_idx = 0
kernel.sched_domain.cpu1.domain0.newidle_idx = 0
kernel.sched_domain.cpu1.domain0.wake_idx = 0
kernel.sched_domain.cpu1.domain0.forkexec_idx = 0
kernel.sched_domain.cpu1.domain0.busy_factor = 64
kernel.sched_domain.cpu1.domain0.imbalance_pct = 110
kernel.sched_domain.cpu1.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu1.domain0.flags = 687
kernel.sched_domain.cpu1.domain0.name = SIBLING
kernel.sched_domain.cpu1.domain1.min_interval = 1
kernel.sched_domain.cpu1.domain1.max_interval = 4
kernel.sched_domain.cpu1.domain1.busy_idx = 2
kernel.sched_domain.cpu1.domain1.idle_idx = 0
kernel.sched_domain.cpu1.domain1.newidle_idx = 0
kernel.sched_domain.cpu1.domain1.wake_idx = 0
kernel.sched_domain.cpu1.domain1.forkexec_idx = 0
kernel.sched_domain.cpu1.domain1.busy_factor = 64
kernel.sched_domain.cpu1.domain1.imbalance_pct = 125
kernel.sched_domain.cpu1.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu1.domain1.flags = 4655
kernel.sched_domain.cpu1.domain1.name = MC
kernel.sched_domain.cpu2.domain0.min_interval = 1
kernel.sched_domain.cpu2.domain0.max_interval = 2
kernel.sched_domain.cpu2.domain0.busy_idx = 0
kernel.sched_domain.cpu2.domain0.idle_idx = 0
kernel.sched_domain.cpu2.domain0.newidle_idx = 0
kernel.sched_domain.cpu2.domain0.wake_idx = 0
kernel.sched_domain.cpu2.domain0.forkexec_idx = 0
kernel.sched_domain.cpu2.domain0.busy_factor = 64
kernel.sched_domain.cpu2.domain0.imbalance_pct = 110
kernel.sched_domain.cpu2.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu2.domain0.flags = 687
kernel.sched_domain.cpu2.domain0.name = SIBLING
kernel.sched_domain.cpu2.domain1.min_interval = 1
kernel.sched_domain.cpu2.domain1.max_interval = 4
kernel.sched_domain.cpu2.domain1.busy_idx = 2
kernel.sched_domain.cpu2.domain1.idle_idx = 0
kernel.sched_domain.cpu2.domain1.newidle_idx = 0
kernel.sched_domain.cpu2.domain1.wake_idx = 0
kernel.sched_domain.cpu2.domain1.forkexec_idx = 0
kernel.sched_domain.cpu2.domain1.busy_factor = 64
kernel.sched_domain.cpu2.domain1.imbalance_pct = 125
kernel.sched_domain.cpu2.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu2.domain1.flags = 4655
kernel.sched_domain.cpu2.domain1.name = MC
kernel.sched_domain.cpu3.domain0.min_interval = 1
kernel.sched_domain.cpu3.domain0.max_interval = 2
kernel.sched_domain.cpu3.domain0.busy_idx = 0
kernel.sched_domain.cpu3.domain0.idle_idx = 0
kernel.sched_domain.cpu3.domain0.newidle_idx = 0
kernel.sched_domain.cpu3.domain0.wake_idx = 0
kernel.sched_domain.cpu3.domain0.forkexec_idx = 0
kernel.sched_domain.cpu3.domain0.busy_factor = 64
kernel.sched_domain.cpu3.domain0.imbalance_pct = 110
kernel.sched_domain.cpu3.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu3.domain0.flags = 687
kernel.sched_domain.cpu3.domain0.name = SIBLING
kernel.sched_domain.cpu3.domain1.min_interval = 1
kernel.sched_domain.cpu3.domain1.max_interval = 4
kernel.sched_domain.cpu3.domain1.busy_idx = 2
kernel.sched_domain.cpu3.domain1.idle_idx = 0
kernel.sched_domain.cpu3.domain1.newidle_idx = 0
kernel.sched_domain.cpu3.domain1.wake_idx = 0
kernel.sched_domain.cpu3.domain1.forkexec_idx = 0
kernel.sched_domain.cpu3.domain1.busy_factor = 64
kernel.sched_domain.cpu3.domain1.imbalance_pct = 125
kernel.sched_domain.cpu3.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu3.domain1.flags = 4655
kernel.sched_domain.cpu3.domain1.name = MC
kernel.sched_domain.cpu4.domain0.min_interval = 1
kernel.sched_domain.cpu4.domain0.max_interval = 2
kernel.sched_domain.cpu4.domain0.busy_idx = 0
kernel.sched_domain.cpu4.domain0.idle_idx = 0
kernel.sched_domain.cpu4.domain0.newidle_idx = 0
kernel.sched_domain.cpu4.domain0.wake_idx = 0
kernel.sched_domain.cpu4.domain0.forkexec_idx = 0
kernel.sched_domain.cpu4.domain0.busy_factor = 64
kernel.sched_domain.cpu4.domain0.imbalance_pct = 110
kernel.sched_domain.cpu4.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu4.domain0.flags = 687
kernel.sched_domain.cpu4.domain0.name = SIBLING
kernel.sched_domain.cpu4.domain1.min_interval = 1
kernel.sched_domain.cpu4.domain1.max_interval = 4
kernel.sched_domain.cpu4.domain1.busy_idx = 2
kernel.sched_domain.cpu4.domain1.idle_idx = 0
kernel.sched_domain.cpu4.domain1.newidle_idx = 0
kernel.sched_domain.cpu4.domain1.wake_idx = 0
kernel.sched_domain.cpu4.domain1.forkexec_idx = 0
kernel.sched_domain.cpu4.domain1.busy_factor = 64
kernel.sched_domain.cpu4.domain1.imbalance_pct = 125
kernel.sched_domain.cpu4.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu4.domain1.flags = 4655
kernel.sched_domain.cpu4.domain1.name = MC
kernel.sched_domain.cpu5.domain0.min_interval = 1
kernel.sched_domain.cpu5.domain0.max_interval = 2
kernel.sched_domain.cpu5.domain0.busy_idx = 0
kernel.sched_domain.cpu5.domain0.idle_idx = 0
kernel.sched_domain.cpu5.domain0.newidle_idx = 0
kernel.sched_domain.cpu5.domain0.wake_idx = 0
kernel.sched_domain.cpu5.domain0.forkexec_idx = 0
kernel.sched_domain.cpu5.domain0.busy_factor = 64
kernel.sched_domain.cpu5.domain0.imbalance_pct = 110
kernel.sched_domain.cpu5.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu5.domain0.flags = 687
kernel.sched_domain.cpu5.domain0.name = SIBLING
kernel.sched_domain.cpu5.domain1.min_interval = 1
kernel.sched_domain.cpu5.domain1.max_interval = 4
kernel.sched_domain.cpu5.domain1.busy_idx = 2
kernel.sched_domain.cpu5.domain1.idle_idx = 0
kernel.sched_domain.cpu5.domain1.newidle_idx = 0
kernel.sched_domain.cpu5.domain1.wake_idx = 0
kernel.sched_domain.cpu5.domain1.forkexec_idx = 0
kernel.sched_domain.cpu5.domain1.busy_factor = 64
kernel.sched_domain.cpu5.domain1.imbalance_pct = 125
kernel.sched_domain.cpu5.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu5.domain1.flags = 4655
kernel.sched_domain.cpu5.domain1.name = MC
kernel.sched_domain.cpu6.domain0.min_interval = 1
kernel.sched_domain.cpu6.domain0.max_interval = 2
kernel.sched_domain.cpu6.domain0.busy_idx = 0
kernel.sched_domain.cpu6.domain0.idle_idx = 0
kernel.sched_domain.cpu6.domain0.newidle_idx = 0
kernel.sched_domain.cpu6.domain0.wake_idx = 0
kernel.sched_domain.cpu6.domain0.forkexec_idx = 0
kernel.sched_domain.cpu6.domain0.busy_factor = 64
kernel.sched_domain.cpu6.domain0.imbalance_pct = 110
kernel.sched_domain.cpu6.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu6.domain0.flags = 687
kernel.sched_domain.cpu6.domain0.name = SIBLING
kernel.sched_domain.cpu6.domain1.min_interval = 1
kernel.sched_domain.cpu6.domain1.max_interval = 4
kernel.sched_domain.cpu6.domain1.busy_idx = 2
kernel.sched_domain.cpu6.domain1.idle_idx = 0
kernel.sched_domain.cpu6.domain1.newidle_idx = 0
kernel.sched_domain.cpu6.domain1.wake_idx = 0
kernel.sched_domain.cpu6.domain1.forkexec_idx = 0
kernel.sched_domain.cpu6.domain1.busy_factor = 64
kernel.sched_domain.cpu6.domain1.imbalance_pct = 125
kernel.sched_domain.cpu6.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu6.domain1.flags = 4655
kernel.sched_domain.cpu6.domain1.name = MC
kernel.sched_domain.cpu7.domain0.min_interval = 1
kernel.sched_domain.cpu7.domain0.max_interval = 2
kernel.sched_domain.cpu7.domain0.busy_idx = 0
kernel.sched_domain.cpu7.domain0.idle_idx = 0
kernel.sched_domain.cpu7.domain0.newidle_idx = 0
kernel.sched_domain.cpu7.domain0.wake_idx = 0
kernel.sched_domain.cpu7.domain0.forkexec_idx = 0
kernel.sched_domain.cpu7.domain0.busy_factor = 64
kernel.sched_domain.cpu7.domain0.imbalance_pct = 110
kernel.sched_domain.cpu7.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu7.domain0.flags = 687
kernel.sched_domain.cpu7.domain0.name = SIBLING
kernel.sched_domain.cpu7.domain1.min_interval = 1
kernel.sched_domain.cpu7.domain1.max_interval = 4
kernel.sched_domain.cpu7.domain1.busy_idx = 2
kernel.sched_domain.cpu7.domain1.idle_idx = 0
kernel.sched_domain.cpu7.domain1.newidle_idx = 0
kernel.sched_domain.cpu7.domain1.wake_idx = 0
kernel.sched_domain.cpu7.domain1.forkexec_idx = 0
kernel.sched_domain.cpu7.domain1.busy_factor = 64
kernel.sched_domain.cpu7.domain1.imbalance_pct = 125
kernel.sched_domain.cpu7.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu7.domain1.flags = 4655
kernel.sched_domain.cpu7.domain1.name = MC
 

thank you

5
  • 1
    Are there any interesting entries in the error log?
    – Andrew B
    Apr 3, 2013 at 17:33
  • when someone tries to download from server will get request time out error.
    – Nimait70
    Apr 3, 2013 at 17:50
  • 1
    You can post the output of sysctl -a. That should do the trick.
    – weselko
    Apr 3, 2013 at 18:29
  • As it stands there is no good way for us to even start to guess at possible causes - Please address the questions asked in the comments by editing your question, and it will automatically be submitted for reopening. Thanks!
    – voretaq7
    Apr 3, 2013 at 19:01
  • I edited my first post and posted sysctl -a output...there is more but the editor doesn't allowed me to enter more than 30000 characters. what else are u need for that?
    – Nimait70
    Apr 3, 2013 at 19:22

1 Answer 1

2

Check your /etc/sysctl.conf file for number of ephemeral ports (port range), number of max filehandlers, and socket memory. All this could impose a limit to how many concurrent requests apache can serve.

6
  • kernel.msgmnb = 65536
    – Nimait70
    Apr 3, 2013 at 17:38
  • kernel.msgmax = 65536
    – Nimait70
    Apr 3, 2013 at 17:39
  • kernel.shmmax = 68719476736
    – Nimait70
    Apr 3, 2013 at 17:39
  • kernel.shmall = 4294967296
    – Nimait70
    Apr 3, 2013 at 17:40
  • do you mean these? I'm new in these stuff,please help if u can.
    – Nimait70
    Apr 3, 2013 at 17:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.