numbas / numbas-lti-provider

An LTI tool provider to run Numbas exams
https://docs.numbas.org.uk/lti/en/latest/
Other
11 stars 12 forks source link

Workers wont keep running, stopping after 1s #95

Closed AshCusack closed 4 years ago

AshCusack commented 4 years ago

When supervisor is running, the daphne runs find, but the workers are "Starting" and restart after 1s each. When i check the stdout log i just get the following on every line

CommandError: You cannot span multiple processes with the in-memory layer. Change your settings to use a cross-process channel layer.

An error log file doesnt seem to have been generated.

christianp commented 4 years ago

Did you say 'yes' to the question "Is this installation for development?" while running first_setup.py? That configures the server to use the in-memory channel layer instead of redis.

Replace the CHANNEL_LAYERS setting in numbasltiprovider/settings.py to the following:

CHANNEL_LAYERS = {
    "default": {
        "BACKEND": "asgi_redis.RedisChannelLayer",
        "CONFIG": {
            "hosts": [os.environ.get('REDIS_URL','redis://localhost:6379')],
            "capacity": 10000,
        },
        "ROUTING": "numbasltiprovider.routing.channel_routing",
    },
}
AshCusack commented 4 years ago

Thanks Christian.