We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connections that are opened to Ace, but never receive data should be closed after an certain timeout. This is the idle_timeout (start_line_timeout).
idle_timeout
This would be used to mitigate https://en.wikipedia.org/wiki/Slowloris_(computer_security) Although this is a much smaller issue normal because of the way erlang handles IO.
We used this python script to test connections
import socket import time import select def check_connection(timeout): conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM) conn.connect(('127.0.0.1', 4100)) time.sleep(timeout) try: ready_to_read, ready_to_write, in_error = select.select([conn,], [conn,], [], 5) except select.error: conn.shutdown(2) # 0 = done receiving, 1 = done sending, 2 = both conn.close() print("Connection failed after %ss wait" % timeout) conn.sendall("""GET /sys/ping HTTP/1.1\r\nHost: merchant\r\nConnection: keep-alive\r\n\r\n""") r = conn.recv(1024) if """{"status":"ok"}""" in r: print("Connection successful after %ss wait" % timeout) else: print("Connection failed after %ss wait" % timeout) if __name__ == "__main__": for timeout in [1, 4, 7]: check_connection(timeout)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Connections that are opened to Ace, but never receive data should be closed after an certain timeout.
This is the
idle_timeout
(start_line_timeout).This would be used to mitigate https://en.wikipedia.org/wiki/Slowloris_(computer_security)
Although this is a much smaller issue normal because of the way erlang handles IO.
We used this python script to test connections
The text was updated successfully, but these errors were encountered: