Nginx无法处理大量请求

时间:2018-09-10 07:52:05

标签: nginx artifactory nginx-reverse-proxy

我有一个场景,其中nginx在Artifactory服务器的前面。 最近,在尝试同时在for循环中提取大量docker图像的同时(第一次测试使用200张图像,第二次测试使用120张图像),由于nginx忙于处理所有请求和用户将无法访问它。

我的nginx服务器运行的是4个cpu内核和8192个ram。

我试图通过添加以下内容来改善服务器中文件的处理:

There was 1 failure:

1) Tests\Browser\RegisterTest::a_guest_can_fill_the_registration_form
Element [body input[name=g-recaptcha-response]] is not present.
Failed asserting that false is true.

/app/vendor/laravel/dusk/src/Concerns/MakesAssertions.php:806
/app/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:67

这使它更好一些(但是,当然,由于块大小,提取1gb +的图像会花费更多时间)-仍然,访问UI会导致很多超时。

每当有更大的负载通过时,我还有其他方法可以改善nginx的性能吗?

我认为我的最后一个选择是增加计算机的大小(更多的cpu)以及nginx上的进程数(8到16)。

完整的nginx.conf文件如下所示:

sendfile on;
sendfile_max_chunk 512k;
tcp_nopush on;

感谢提示。

干杯, 里卡多

0 个答案:

没有答案