29.11.2013, 11:42. Показов 1237. Ответов 0
Всем привет, возникает ошибка 504 из-за нехватки обработки по времени скрипту.
Прописал в php.ini 800 секунд, прописал в htacces 800 cсекунд, также в nginx.conf прописал proxy_connect_timeout 800;proxy_send_timeout 800;proxy_read_timeout 800; бесполезняк, работает менее 2 минут и отрубается скрипт.
Может кто поможет? Конфиг прикладываю.
Кликните здесь для просмотра всего текста
| Code |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
| user apache;
worker_processes 2;
worker_rlimit_nofile 100000;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
# Äîáàâèë íîâûå äàííûå çàêîìåíòèë ñòàðûå
gzip on; # Âêëþ÷àåì GZIP àðõèâàöèþ äàííûõ
gzip_min_length 1000; # Óñòàíàâëèâàåì ìèíèìàëüíóþ äëèíó îòâåòà, ïðè êîòîðîé ìîäóëü áóäåò æàòü, â áàéòàõ
gzip_proxied any; #Äàåì ïîíÿòü âåá-ñåðâåðó, ÷òî ìîæíî æàòü âñå ïðîêñèðîâàííûå çàïðîñû
gzip_types text/plain application/xml application/x-javascript text/javascript text/css text/json; #Óêàçûâàåì MIME òèïû, êîòîðûå áóäóò ñæèìàòüñÿ
gzip_disable «msie6?; # Îòêëþ÷àåì ñæàòèå äëÿ 6-ãî ýêñïëîðåðà
gzip_comp_level 6; # Óêàçûâàåì ñòåïåíü ñæàòèÿ îò 1 äî 10, 6 — çîëîòàÿ ñåðåäèíà (æðåò íåìíîãî ïðîöåññîðíîãî âðåìåíè è îïòèìàëüíî óæèìàåò)
# gzip on;
gzip_static on;
# gzip_comp_level 5;
#gzip_min_length 1024;
#keepalive_timeout 65;
keepalive_timeout 800s;
proxy_connect_timeout 800s;
proxy_send_timeout 800s;
proxy_read_timeout 800s;
limit_conn_zone $binary_remote_addr zone=addr:10m;
# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
include /usr/local/ispmgr/etc/nginx.domain;
client_max_body_size 16M;
log_format isp '$bytes_sent $request_length';
server {
server_name modnaja.ru www.modnaja.ru;
listen 145.78.166.234;
disable_symlinks if_not_owner from=$root_path;
set $root_path /var/www/tarn/data/www/modnaja.ru;
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
root $root_path;
access_log /var/www/nginx-logs/tarn isp;
access_log /var/www/httpd-logs/modnaja.ru.access.log ;
error_page 404 = @fallback;
}
location / {
proxy_pass http://145.78.166.234:81;
proxy_redirect http://145.78.166.234:81/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ {
proxy_pass http://145.78.166.234:81;
proxy_redirect http://145.78.166.234:81/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location @fallback {
proxy_pass http://145.78.166.234:81;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
include /usr/local/ispmgr/etc/nginx.inc;
}
server {
server_name nratin.ru www.nratin.ru;
listen 145.78.166.234;
disable_symlinks if_not_owner from=$root_path;
set $root_path /var/www/tarn/data/www/nratin.ru;
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
root $root_path;
access_log /var/www/nginx-logs/tarn isp;
access_log /var/www/httpd-logs/nratin.ru.access.log ;
error_page 404 = @fallback;
}
location / {
proxy_pass http://145.78.166.234:81;
proxy_redirect http://145.78.166.234:81/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ {
proxy_pass http://145.78.166.234:81;
proxy_redirect http://145.78.166.234:81/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location @fallback {
proxy_pass http://145.78.166.234:81;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
include /usr/local/ispmgr/etc/nginx.inc;
}
server {
server_name donor.nratin.ru www.donor.nratin.ru;
listen 145.78.166.234;
disable_symlinks if_not_owner from=$root_path;
set $root_path /var/www/tarn/data/www/donor.nratin.ru;
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
root $root_path;
access_log /var/www/nginx-logs/tarn isp;
access_log /var/www/httpd-logs/donor.nratin.ru.access.log ;
error_page 404 = @fallback;
}
location / {
proxy_pass http://145.78.166.234:81;
proxy_redirect http://145.78.166.234:81/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ {
proxy_pass http://145.78.166.234:81;
proxy_redirect http://145.78.166.234:81/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location @fallback {
proxy_pass http://145.78.166.234:81;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
include /usr/local/ispmgr/etc/nginx.inc;
}
server {
server_name foryou.ru www.foryou.ru;
listen 145.78.166.234;
disable_symlinks if_not_owner from=$root_path;
set $root_path /var/www/tarn/data/www/foryou.ru;
location ~* ^.+.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js)$ {
root /var/www/tarn/data/www/foryou.ru;
expires 2d; # директива кэширования
access_log /var/www/nginx-logs/tarn isp;
access_log /var/www/httpd-logs/foryou.ru.access.log ;
error_page 404 = @fallback;
}
location / {
proxy_pass http://145.78.166.234:81;
proxy_redirect http://145.78.166.234:81/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ {
proxy_pass http://145.78.166.234:81;
proxy_redirect http://145.78.166.234:81/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location @fallback {
proxy_pass http://145.78.166.234:81;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
include /usr/local/ispmgr/etc/nginx.inc;
}
server {
server_name odezhda.nratin.ru www.odezhda.nratin.ru;
listen 145.78.166.234;
disable_symlinks if_not_owner from=$root_path;
set $root_path /var/www/tarn/data/www/odezhda.nratin.ru;
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
root $root_path;
access_log /var/www/nginx-logs/tarn isp;
access_log /var/www/httpd-logs/odezhda.nratin.ru.access.log ;
error_page 404 = @fallback;
}
location / {
proxy_pass http://145.78.166.234:81;
proxy_redirect http://145.78.166.234:81/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ {
proxy_pass http://145.78.166.234:81;
proxy_redirect http://145.78.166.234:81/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location @fallback {
proxy_pass http://145.78.166.234:81;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
include /usr/local/ispmgr/etc/nginx.inc;
}
server {
server_name mazino.ru www.mazino.ru;
listen 145.78.166.234;
disable_symlinks if_not_owner from=$root_path;
set $root_path /var/www/tarn/data/www/mazino.ru;
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
root $root_path;
access_log /var/www/nginx-logs/tarn isp;
access_log /var/www/httpd-logs/mazino.ru.access.log ;
error_page 404 = @fallback;
}
location / {
proxy_pass http://145.78.166.234:81;
proxy_redirect http://145.78.166.234:81/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ {
proxy_pass http://145.78.166.234:81;
proxy_redirect http://145.78.166.234:81/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location @fallback {
proxy_pass http://145.78.166.234:81;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
include /usr/local/ispmgr/etc/nginx.inc;
}
} |
|
Добавлено через 4 часа 42 минуты
Столько спецов и тишина?
Добавлено через 17 часов 54 минуты
Судя по терминалу командой top нагрузка не большая, просматривая phpinfo max_execution_time равен 30 секундам, просматривая php.ini выставлено 800 секунд, сервер перезагружал неоднократно.