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

Out-Of-Memory crash during database upload #51

Open
MHeinrichs opened this issue Jan 6, 2023 · 2 comments
Open

Out-Of-Memory crash during database upload #51

MHeinrichs opened this issue Jan 6, 2023 · 2 comments
Assignees

Comments

@MHeinrichs
Copy link
Collaborator

MHeinrichs commented Jan 6, 2023

Committing a large simulation (100% Berlin) results in the following error on a 256GB-RAM machine:

Traceback (most recent call last):
File "/usr/lib64/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib64/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "tsc_main.py", line 454, in simulation_request
s2t_miv.upload_trip_results(conn, sim_key, params, final_routes)
File "/usr/share/sumo/tools/sumolib/miscutils.py", line 41, in benchmark_wrapper
result = func(*args, **kwargs)
File "/mnt/SUMO/tsc2023/tsc/s2t_miv.py", line 154, in upload_trip_results
cursor.execute(insertQuery % schema_table + ','.join(values))
psycopg2.errors.ProgramLimitExceeded: FEHLER: Speicher aufgebraucht
DETAIL: Kann Zeichenkettenpuffer mit 0 Bytes nicht um 1220878031 Bytes vergrößern.

suggested fix (txt instead of py) in lines 153-175:
s2t_pt.txt

@behrisch behrisch self-assigned this Jan 6, 2023
@behrisch
Copy link
Contributor

behrisch commented Jan 6, 2023

The uploaded file contains the original (unchanged) source code

behrisch added a commit that referenced this issue Jan 6, 2023
@behrisch
Copy link
Contributor

behrisch commented Jan 6, 2023

We already had a try on using a dedicated postgres function here https://www.psycopg.org/docs/extras.html#fast-execution-helpers. I tried to re-enable this code, maybe it already helps

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