Skip to content
New issue

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

E-Commerce Course Admin page threw datatable/ajax errors #14

Closed
agiledigits opened this issue Jan 20, 2021 · 1 comment
Closed

E-Commerce Course Admin page threw datatable/ajax errors #14

agiledigits opened this issue Jan 20, 2021 · 1 comment

Comments

@agiledigits
Copy link

After installing the latest Tutor and enabling the discovery/e-commerce plugins, I navigated to E-Commerce Course Admin page (https://ecommerce.<LMS_ROOT>/courses/), and the "Courses" and "Coupons" tabs would randomly throw an error message about “DataTables warning: table id=courseTable - Ajax error." Inspecting the network requests in the browser’s devtools revealed that it was the API call to “/api/v2/courses?format=datatables…” that was returning 502 Bad Gateway error.

There were entries like this in the ecommerce log:

invalid request block size: 5104 (max 4096)...skip
ecommerce_1         | [uwsgi-http key: ecommerce.<lms_root> client_addr: 172.18.0.15 client_port: 21151] hr_instance_read(): Connection reset by peer [plugins/http/http.c line 647]

Then nginx log reported that “upstream prematurely closed connection while reading response header from upstream”.

It seems that we need to increase the buffer size for uwsgi, according to this: https://stackoverflow.com/questions/15878176/uwsgi-invalid-request-block-size. For Tutor it would mean adding "--buff:er-size=8196" to the following command in Dockerfile:

CMD uwsgi \
    --static-map /static=/openedx/staticfiles/ \
    --static-map /media=/openedx/media/ \
    --http 0.0.0.0:8000 \
    --thunder-lock \
    --single-interpreter \
    --enable-threads \
    --processes=${UWSGI_WORKERS:-2} \
    **--buffer-size=8196 \**
    --wsgi-file ${SERVICE_VARIANT}/wsgi.py

The related discussions are captured here: https://discuss.overhang.io/t/e-commerce-course-admin-page-threw-datatable-ajax-errors/1216/4

@regisb regisb closed this as completed in 6df2c99 Jan 20, 2021
@regisb
Copy link
Contributor

regisb commented Jan 20, 2021

Thanks a lot for this @agiledigits! This will be resolved in v11.0.1, which will be released in a few minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants