Skip to content

Instantly share code, notes, and snippets.

View xiaoyao1991's full-sized avatar

Xiaoyao Qian xiaoyao1991

View GitHub Profile
@xiaoyao1991
xiaoyao1991 / gist:0f32e2e5e8d03ad38401
Last active August 29, 2015 14:27 — forked from pgaref/gist:7ed87e47cd735a423e70
Jmeter running out of addresses
java.net.NoRouteToHostException: Cannot assign requested address: JMeter server is unable to allocate a port to create a connection to the JMeter client to return the samples.
Same thing happened to Nginx front-end as well!
java.net.NoRouteToHostException: Cannot assign requested address
Otherwise, the following messages may appear in the JMeter JTL files:
Non HTTP response code: java.net.BindException
Non HTTP response message: Address already in use
The solution is to enable fast recycling TIME_WAIT sockets.
@xiaoyao1991
xiaoyao1991 / gmail.py
Created November 20, 2012 10:07
Sending email
import smtplib
sendto = ['xxx@xxx.com', 'yyy@yyy.com', 'zzz@zzz.com'] #收件人
no = [1,2,3] #编号
gmail_username = 'youremail@gmail.com'
gmail_password = 'password'
smtpserver = smtplib.SMTP("smtp.gmail.com", 587)
smtpserver.ehlo()