Tengo una aplicación opencart implementada con nginx, fastcgi. Estoy usando RDS como servidor Mysql.
Últimamente he tenido estos errores en mi registro y ejecuté una prueba de carga con asedio para 400 usuarios simultáneos. Recibo este error.
FastCGI sent in stderr: "PHP message: PHP Warning: mysqli::mysqli
mientras ejecuta la misma prueba de carga con Siege usando Apache como servidor. La prueba arroja resultados positivos.
Estos son los resultados del asedio con nginx
Transactions: 3246 hits
Availability: 77.80 %
Elapsed time: 146.43 secs
Data transferred: 35.27 MB
Response time: 6.86 secs
Transaction rate: 22.17 trans/sec
Throughput: 0.24 MB/sec
Concurrency: 152.01
Successful transactions: 1049
Failed transactions: 926
Longest transaction: 36.83
Shortest transaction: 0.65
y con apache
Transactions: 7921 hits
Availability: 99.01 %
Elapsed time: 462.60 secs
Data transferred: 218.75 MB
Response time: 9.94 secs
Transaction rate: 17.12 trans/sec
Throughput: 0.47 MB/sec
Concurrency: 170.12
Successful transactions: 4925
Failed transactions: 79
Longest transaction: 114.25
Shortest transaction: 0.59
Estos son nginx y fpm conf:
user www-data;
worker_processes 1;
pid /run/nginx.pid;
events {
worker_connections 1024;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
# Compression
# Enable Gzip compressed.
gzip on;
# Enable compression both for HTTP/1.0 and HTTP/1.1.
#gzip_http_version 1.1;
# Compression level (1-9).
# 5 is a perfect compromise between size and cpu usage, offering about
# 75% reduction for most ascii files (almost identical to level 9).
gzip_comp_level 4;
# Don't compress anything that's already small and unlikely to shrink much
# if at all (the default is 20 bytes, which is bad as that usually leads to
# larger files after gzipping).
gzip_min_length 256;
# Compress data even for clients that are connecting to us via proxies,
# identified by the "Via" header (required for CloudFront).
gzip_proxied any;
# Tell proxies to cache both the gzipped and regular version of a resource
# whenever the client's Accept-Encoding capabilities header varies;
# Avoids the issue where a non-gzip capable client (which is extremely rare
# today) would display gibberish if their proxy gave them the gzipped version.
gzip_vary on;
# Compress all output labeled with one of the following MIME-types.
gzip_types
application/atom+xml
application/javascript
application/x-javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
text/plain
text/x-component
text/xml
text/javascript
text/x-javascript
# text/html is always compressed by HttpGzipModule
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
#include /etc/nginx/naxsi_core.rules;
##
# nginx-passenger config
##
# Uncomment it if you installed nginx-passenger
##
#passenger_root /usr;
#passenger_ruby /usr/bin/ruby;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}