Skip to content

Instantly share code, notes, and snippets.

View hanx11's full-sized avatar
🤡
Focusing

Han Feng hanx11

🤡
Focusing
View GitHub Profile
@hanx11
hanx11 / amqp.py
Created November 14, 2018 14:13 — forked from sjlongland/amqp.py
Tornado Coroutine interface to AMQP (pika)
#!/usr/bin/python
import datetime
import logging
import threading
import weakref
import tornado
import tornado.gen
import pika
@hanx11
hanx11 / gist:87ee7e4bad0a2023158622796f788021
Created November 1, 2018 06:06 — forked from luckydev/gist:b2a6ebe793aeacf50ff15331fb3b519d
Increate max no of open files limit in Ubuntu 16.04 for Nginx
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf