terraframe / geoprism-registry

GeoPrism Registry is a system for curating interlinked data through time. It's the first framework implementing the Common Geo-Registry specification.
https://geoprismregistry.com/
GNU Lesser General Public License v3.0
18 stars 5 forks source link

Importer running for too long on staging #914

Closed rrowlands closed 1 year ago

rrowlands commented 1 year ago

A user of the GPR has found an import job which has been running for several days now on the staging server. This is highly suspicious, given that the spreadsheet only contains 1080 rows. The import is currently in the validation stage.

rrowlands commented 1 year ago

I looked into this, it appears that the spreadsheet in question has about a million empty rows within it. Unfortunately our system is processing each row one by one and generating tons of useless error report information.

Mc7434 commented 1 year ago

Work perfectly. This ticket can be closed.

rfromthecastle commented 1 year ago

I think this ticket needs to stay open: the issue is still occurring on Staging.

image

rrowlands commented 1 year ago

OK I have manually canceled the running job on the staging server. For future reference, I have written down the steps.

How to manually cancel a running job:

  1. Find the config_json column in the database. This query will list the currently running jobs ordered by the date they started import: select * from import_history ih natural join job_history jh order by create_date desc limit 10;
  2. Grab the 'vaultFileId' from the config_json and substitute it into the oid for this query: select * from vault_file where oid='3dd5caa1-ff28-4077-b71e-56d362000069'
  3. The vault file query should list only one record and that record should have a column called 'vault_path' with a value something like 0/0/2/6/3/d/
  4. On the server hosting the GPR, there should exist a folder at (following the path from the previous step): /data/geoprism/vault/0/0/2/6/3/d. Stop the GPR. Rename the last folder (d, in this example) to something else (such as d2 in this example). Start the GPR. The job should now have failed. Rename the folder back to what it previously was.

All of this is necessary because the GPR will automatically resume the import if you simply reboot the server.

rrowlands commented 1 year ago

Additionally, this issue happened again because the software fix for this issue has not yet been deployed to the server. Given that training is happening (today? tomorrow?) I'm going to assume we don't want to do any sort of software updates or anything right now to fix the issue. So, yes, definitely don't import any spreadsheets that have millions of empty rows in them until this new software update is pushed.