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

Trying to create too many targets from alerts crashes the TOM with Error #1172

Open
jchate6 opened this issue Feb 4, 2025 · 2 comments
Open
Labels
bug Something isn't working

Comments

@jchate6
Copy link
Contributor

jchate6 commented Feb 4, 2025

TooManyFieldsSent at /alerts/alert/create/
The number of GET/POST parameters exceeded settings.DATA_UPLOAD_MAX_NUMBER_FIELDS.

Traceback (most recent call last):
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/http/request.py", line 514, in __init__
    for key, value in parse_qsl(query_string, **parse_qsl_kwargs):
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/urllib/parse.py", line 800, in parse_qsl
    raise ValueError('Max number of fields exceeded')
ValueError: Max number of fields exceeded

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = middleware_method(
               ^^^^^^^^^^^^^^^^^^
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/middleware/csrf.py", line 470, in process_view
    self._check_token(request)
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/middleware/csrf.py", line 373, in _check_token
    request_csrf_token = request.POST.get("csrfmiddlewaretoken", "")
                         ^^^^^^^^^^^^
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/core/handlers/wsgi.py", line 93, in _get_post
    self._load_post_and_files()
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/http/request.py", line 383, in _load_post_and_files
    QueryDict(self.body, encoding=self._encoding),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/http/request.py", line 521, in __init__
    raise TooManyFieldsSent(
django.core.exceptions.TooManyFieldsSent: The number of GET/POST parameters exceeded settings.DATA_UPLOAD_MAX_NUMBER_FIELDS.
The number of GET/POST parameters exceeded settings.DATA_UPLOAD_MAX_NUMBER_FIELDS.
Traceback (most recent call last):
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/http/request.py", line 514, in __init__
    for key, value in parse_qsl(query_string, **parse_qsl_kwargs):
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/urllib/parse.py", line 800, in parse_qsl
    raise ValueError('Max number of fields exceeded')
ValueError: Max number of fields exceeded

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = middleware_method(
               ^^^^^^^^^^^^^^^^^^
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/middleware/csrf.py", line 470, in process_view
    self._check_token(request)
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/middleware/csrf.py", line 373, in _check_token
    request_csrf_token = request.POST.get("csrfmiddlewaretoken", "")
                         ^^^^^^^^^^^^
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/core/handlers/wsgi.py", line 93, in _get_post
    self._load_post_and_files()
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/http/request.py", line 383, in _load_post_and_files
    QueryDict(self.body, encoding=self._encoding),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jchatelain/test_tom/fink_test/env/lib64/python3.12/site-packages/django/http/request.py", line 521, in __init__
    raise TooManyFieldsSent(
django.core.exceptions.TooManyFieldsSent: The number of GET/POST parameters exceeded settings.DATA_UPLOAD_MAX_NUMBER_FIELDS.
Bad Request: /alerts/alert/create/
Bad Request: /alerts/alert/create/

@github-project-automation github-project-automation bot moved this to Triage in TOM Toolkit Feb 4, 2025
@jchate6 jchate6 added the bug Something isn't working label Feb 4, 2025
@jchate6
Copy link
Contributor Author

jchate6 commented Feb 4, 2025

This also breaks the cache somehow in tom_alerts/views.

@jchate6 jchate6 moved this from Triage to Backlog in TOM Toolkit Feb 7, 2025
@jchate6
Copy link
Contributor Author

jchate6 commented Feb 7, 2025

To reproduce:
in tom_fink broker, set cone search to 12, 12, 1200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant