Error messages under heavy load
Under heavy load, I get the following output repeatedly:
...
char-whitespace?: contract violation
expected: char?
given: #<eof>
context...:
/anarki/ac.scm:1262:4
/anarki/ac.scm:1279:0: aload1
char-whitespace?: contract violation
expected: char?
given: #<eof>
context...:
/anarki/ac.scm:1247:0: trash-whitespace
/anarki/ac.scm:1262:4
/anarki/ac.scm:1279:0: aload1
...
Is there any way to run this non-interactively?
Those errors mean that users are closing the browser connection before it has a chance to return all of the response. Under load Arc takes longer and longer to return a response.
Any advise on how to tune it to get the most out of it?
I'm afraid not.. How many concurrent connections are you seeing?
I assume you're running Anarki?
Yes, im running Anarki from a Docker container (see #41).
With less than 100 concurrent users per second crashes on a $10 Digital Ocean droplet.
I see this same issue immediately after launching @fauria's container with no user access
@dholt could you pastebin the container logs?
This is all I get; the error block is repeated in an infinite loop enough to peg the CPU core:
load items:
ready to serve port 8080
char-whitespace?: contract violation
expected: char?
given: #<eof>
context...:
/anarki/ac.scm:1277:4
/anarki/ac.scm:1294:0: aload1
char-whitespace?: contract violation
expected: char?
given: #<eof>
context...:
/anarki/ac.scm:1262:0: trash-whitespace
/anarki/ac.scm:1277:4
/anarki/ac.scm:1294:0: aload1
Could you please provide the command line used to launch the container? There are a few sed replacements along the entry point script that might be causing the issue.
I'm launching via Ansible:
---
- name: hackernews | launch container
docker:
name: "hackernews"
hostname: "example.com"
image: "fauria/hn"
state: reloaded
restart_policy: always
ports:
- "80:8080"
volumes:
- "/mnt/hackernews/static:/anarki/static"
- "/mnt/hackernews/www:/anarki/www"
env:
SITE_NAME: "Example Hacker News"
SITE_DESCRIPTION: "Example Hacker News"
SITE_URL: "http://example.com"
PARENT_URL: "http://example.com"
ADMIN_USER: "dholt"
RGB_COLOR: "76b900"
tags:
- container
Does news.arc actually crash, or is it just displaying some error messages?
You're right, it's just displaying error messages.
Perhaps the errors from a browser closing a connection, could be changed to look a bit less panicky.
That seems like a great idea.
Maybe this fix is ok?
Definitely an improvement!
Turns out it might be a bit to wide ranging. It just catches any error that could cause the connection to terminate, so it could also hide useful information. I need to look at it a bit more.
Ah, interesting.