Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts
file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com
#coding: utf-8 | |
from cStringIO import StringIO | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
from email.header import Header | |
from email import Charset | |
from email.generator import Generator | |
import smtplib | |
# Example address data |
#!/usr/bin/env python | |
#coding=utf8 | |
from cStringIO import StringIO | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
from email.header import Header | |
from email import Charset | |
from email.generator import Generator | |
from email.utils import formataddr | |
import smtplib |
Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts
file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com
On Tue Oct 27, 2015, history.state.gov began buckling under load, intermittently issuing 500 errors. Nginx's error log was sprinkled with the following errors:
2015/10/27 21:48:36 [crit] 2475#0: accept4() failed (24: Too many open files)
2015/10/27 21:48:36 [alert] 2475#0: *7163915 socket() failed (24: Too many open files) while connecting to upstream...
An article at http://www.cyberciti.biz/faq/linux-unix-nginx-too-many-open-files/ provided directions that mostly worked. Below are the steps we followed. The steps that diverged from the article's directions are marked with an *.
su
to run ulimit
on the nginx account, use ps aux | grep nginx
to locate nginx's process IDs. Then query each process's file handle limits using cat /proc/pid/limits
(where pid
is the process id retrieved from ps
). (Note: sudo
may be necessary on your system for the cat
command here, depending on your system.)fs.file-max = 70000
to /etc/sysctl.confimport sys | |
from io import BytesIO | |
from PIL import Image | |
import xml.etree.cElementTree as et | |
from django.core.exceptions import ValidationError | |
from django.forms import ImageField as DjangoImageField | |
from django.utils import six | |
ssh-keygen -t rsa -b 4096 -C "[email protected]"