网易云课堂MySQL从入门到精通

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_31642819/article/details/88741932

需要学习资源,请点击开挂教学楼

需要学习资源,请点击开挂教学楼

upstream django {
    server unix:///home/ec2-user/MyDomainVenv/MyDomainWeb/site1.socket; # for a file socket
}

server {
    # the port your site will be served on
    listen      80;
    server_name .MyDomain.com;
    charset     utf-8;

    # max upload size
    client_max_body_size 75M;  

     location /ws/ {
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_pass http://unix:///home/ec2-user/MyDomainVenv/MyDomainWeb/web.socket;   
        }

    # Finally, send all non-media requests to the Django server.
    location / {
        uwsgi_pass  django;
        # the uwsgi_params file you installed
        include     /home/ec2-user/MyDomainVenv/MyDomainWeb/uwsgi_params;
    }
}
import os
import gevent.socket
import redis.connection
redis.connection.socket = gevent.socket
os.environ.update(DJANGO_SETTINGS_MODULE='main.settings')
from ws4redis.uwsgi_runserver import uWSGIWebsocketServer
application = uWSGIWebsocketServer()
/home/ec2-user/MyDomainVenv/bin/uwsgi --virtualenv /home/ec2-user/MyDomainVenv --http-socket /home/ec2-user/MyDomainVenv/MyDomainWeb/web.socket --gevent 1000 --http-websockets --workers=2 --master --module main.wsgi_websocket
ws://34.212.xx.123/ws/
ets --workers=2 --master --module main.wsgi_websocket
*** Starting uWSGI 2.0.17.1 (64bit) on [Fri Mar 22 06:27:11 2019] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-28) on 22 November 2018 10:42:11
os: Linux-4.14.77-70.59.amzn1.x86_64 #1 SMP Mon Nov 12 22:02:45 UTC 2018
nodename: ip-172-31-41-78
machine: x86_64
clock source: unix
detected number of CPU cores: 1
current working directory: /home/ec2-user/MyDomainVenv/MyDomainWeb
detected binary path: /home/ec2-user/MyDomainVenv/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your processes number limit is 3860
your memory page size is 4096 bytes
detected max file descriptor number: 1024
- async cores set to 1000 - fd table size: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /home/ec2-user/MyDomainVenv/MyDomainWeb/web.socket fd 3
Python version: 3.5.6 (default, Nov  5 2018, 20:20:10)  [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
PEP 405 virtualenv detected: /home/ec2-user/MyDomainVenv
Set PythonHome to /home/ec2-user/MyDomainVenv
Python main interpreter initialized at 0x2617640
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 31555392 bytes (30815 KB) for 2000 cores
*** Operational MODE: preforking+async ***
WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x2617640 pid: 7882 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 7882)
spawned uWSGI worker 1 (pid: 7885, cores: 1000)
spawned uWSGI worker 2 (pid: 7886, cores: 1000)

猜你喜欢

转载自blog.csdn.net/qq_31642819/article/details/88741932