我已经在服务器Ubuntu20.04 OVH VPS (8 8vCore,16 on )上的一个码头容器中配置了Django通道。运行django-频道我使用了daphne。版本:
Django==3.1.4
channels==3.0.2
daphne==3.0.1我使用了与的图像,Mysql的图像,Redis的图像。
我使用Locust来检查应用程序的负载性能。当我有超过10 10/S时,服务器HTTP响应时间变得巨大(> 10秒),应用程序变得不可用。
瓶颈在哪里?怎样才能提高性能呢?
ConnectionError(ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))过多时,我所得到的错误我已经搜索并发现使用倍数过程与监督或库伯奈特可能有帮助。但我想在进化之前确定一切都是正常的。
我可以共享项目文件docker-compose.yml、routing.py、settings.py,但对我来说现在似乎没有什么帮助。
发布于 2021-01-02 08:49:28
谢谢,这里是命令输出
( A)运行到根: ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 62405
max locked memory (kbytes, -l) 65536
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 62405
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimitedB)运行到mysql容器中:显示全局状态,如'%open%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Com_ha_open | 0 |
| Com_show_open_tables | 0 |
| Innodb_num_open_files | 29 |
| Open_files | 14 |
| Open_streams | 0 |
| Open_table_definitions | 113 |
| Open_tables | 114 |
| Opened_files | 149 |
| Opened_table_definitions | 113 |
| Opened_tables | 121 |
| Slave_open_temp_tables | 0 |
| Table_open_cache_hits | 25 |
| Table_open_cache_misses | 121 |
| Table_open_cache_overflows | 0 |
+----------------------------+-------+( C)显示全局变量,如'%open%';
+----------------------------+---------+
| Variable_name | Value |
+----------------------------+---------+
| have_openssl | YES |
| innodb_open_files | 2000 |
| open_files_limit | 1048576 |
| table_open_cache | 2000 |
| table_open_cache_instances | 16 |
+----------------------------+---------+D)显示全局状态,如‘%脏%’;
+--------------------------------+-------+
| Variable_name | Value |
+--------------------------------+-------+
| Innodb_buffer_pool_pages_dirty | 0 |
| Innodb_buffer_pool_bytes_dirty | 0 |
+--------------------------------+-------+E)显示全球状态,如“正常运行时间”;
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Uptime | 544 |
+---------------+-------+https://serverfault.com/questions/1047874
复制相似问题