Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-28, 20:32:14

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Anik

Pages: [1]
1
Kloxo-MR Technical Helps / forum config
« on: 2013-02-26, 16:26:20 »
Mustafa, can you post here this forums config?

like the php-fpm, nginx's config files?

2
Kloxo-MR Technical Helps / Tweaks with config.
« on: 2013-02-20, 13:06:25 »
Hello guys,

i tried all the trial and error methods with the configuration files in my vps, for sometime it worked but it now again started to giving headaches. everyday i am getting 1-2 hours of downtime. The problem is in php-fpm, it's expiring as usual and the only way to fix it is to restart it manually or automatically. So i decided to post here most of the config files, test them, tweak them, drop them do anything you want. only we need a highly optimized configuration which will utilize every possible resource and will be top in performance and speed.

Before i began, the hardware and software of the sever is 8 core xeon, 2GB RAM, 4GB swap. nginxproxy, php-fpm event, php53u.

So lets drool. :)

# /etc/security/limits.conf

Code: [Select]
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - an user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open files
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit
#        - maxlogins - max number of logins for this user
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
#        - msgqueue - max memory used by POSIX message queues (bytes)
#        - nice - max nice priority allowed to raise to
#        - rtprio - max realtime priority
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4

# End of file

admin soft nofile 15000
admin hard nofile 32000
nginx soft nofile 10000
nginx hard nofile 22528
mysql soft nofile 10000
mysql hard nofile 16384
root soft nofile 10000
root hard nofile 16384

/etc/sysctl.conf

Code: [Select]
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456

fs.file-max = 80000

/etc/my.cnf

Code: [Select]
[mysqld]
skip-bdb
skip-locking
skip-external-locking
key_buffer_size = 45M
query_cache_size = 50M
sort_buffer_size = 32M
read_rnd_buffer_size = 32M
tmp_table_size = 80M
max_heap_table_size = 80M
table_cache = 300
thread_cache_size = 5
#default-storage-engine=myisam
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
thread_concurrency = 4
wait_timeout = 1200

## InnoDB
#innodb-buffer-pool-size        = 58M
#innodb-log-file-size           = 50M
#innodb-log-buffer-size         = 8M
#innodb-file-per-table          = 1
#innodb-open-files              = 500

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/dev/null
expire_logs_days = 5
pid-file=/var/run/mysqld/mysqld.pid

/etc/php-fpm.conf

Code: [Select]
[global]
pid=/var/run/php-fpm/php-fpm.pid
error_log=/dev/null
log_level=alert
emergency_restart_threshold=10
emergency_restart_interval=1m
process_control_timeout=10s
daemonize=yes

include=/etc/php-fpm.d/*.conf

/etc/php-fpm.d/admin.conf

Code: [Select]
[admin]
listen = 127.0.0.1:51006
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
user = admin
group = admin
pm = dynamic
pm.max_children = 15
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 2
pm.max_requests = 1000
;pm.status_path = /status
;ping.path = /ping
;ping.response = pong
request_terminate_timeout = 60s
request_slowlog_timeout = 20s
slowlog = /dev/null
rlimit_files = 2048
rlimit_core = 0
;chroot =
;chdir = /var/www
catch_workers_output = yes
security.limit_extensions = .php .php3 .php4 .php5

env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f webmaster@domain.com
;php_flag[display_errors] = off
php_admin_value[error_log] = /dev/null
php_admin_value[session.save_path] = /var/lib/php/session
php_admin_flag[log_errors] = off
php_admin_value[memory_limit] = 64M

/etc/nginx/nginx.conf

Code: [Select]
user nginx;

worker_processes 5;
worker_rlimit_nofile 4096;

pid /var/run/nginx.pid;

events {
    worker_connections 2048;

    use epoll;
}


http {
    add_header Cache-Control public;
    server_names_hash_max_size 1024;
    server_names_hash_bucket_size 128;
    client_body_buffer_size 128k;
    client_max_body_size 32M;
    include '/etc/nginx/conf.d/*.conf';
    reset_timedout_connection off;
}

So here are they. if you need more configs to see, tellme.

Right now traffic are not too high, something about 800000 per month. so please tellme which config tweak will give me maximum.
by average it takes no more than 1.2 gb of ram and 20% processor state. page creation time is little slower too. So what should i change?

Anik.

3
Kloxo-MR Technical Helps / event-worker
« on: 2013-02-05, 13:34:46 »
what is the difference? which one is best and why?

4
GNU/Linux Helps / This forum's config
« on: 2013-02-03, 14:18:01 »
Tell us what this forum is using. The hardware and software configuration. how much resource it uses etc.
It's response time is impressive.

5
Kloxo-MR Technical Helps / Is suphp okay now?
« on: 2013-01-25, 22:38:42 »
Before in kloxo MR suphp was not working (about 4-5 months ago). php was giving output as the source code.
So is it now working?

6
Kloxo-MR Technical Helps / The connection was reset
« on: 2013-01-13, 00:43:58 »
Sometimes (not always) when i access my site i see errors like..

Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.

or

On Firefox:
Problem loading page
The connection to the server was reset while the page was loading.

on Chrome:
This webpage is not available
The connection to domain.com was interrupted.
Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.

any idea what is the reason of it?

7
About Forum Members / Great
« on: 2012-12-29, 21:31:11 »
Nice to meet you guys in a new space. :)

Pages: [1]

Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine

Page created in 0.037 seconds with 16 queries.

web stats analysis