question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`arango.exceptions.AsyncJobResultError` : job 1530399 not done

See original GitHub issue
  • I’m executing AQL queries by creating the AsyncDatabase instance of database from arango.database.StandardDatabase.begin_async_execution and even after executing simple insert queries, it returns AsyncJobResultError too often. The query simply looks like:
# db is the AsyncDatabase instance of the database
 result = db.insert_document(
       collection="test",
        document=doc_in_db,
        return_new=return_new,
        sync=sync
    )
 result = wait_for_results(result)
 return result
  • I used the wait_for_results function to wait for the job to finish, but it didn’t help either: The wait_for_results looks like this:
def wait_for_results(job):
    while job.status() != 'done':
        time.sleep(0.5)
    time.sleep(0.5)
    return job.result()

It returns:

Any pointers on how the problem can be fixed?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
tjoubertcommented, Oct 31, 2022

@aaqibb13, I am trying to reproduce the issue, without any luck so far. Here is the code that I am using:

import time

from arango import (
    ArangoClient,
    AQLQueryExecuteError,
    AsyncJobCancelError,
    AsyncJobClearError
)

client = ArangoClient(hosts="http://localhost:8529")

sdb = client.db('<dbName>', username='<userName>', password='<password>')
adb = sdb.begin_async_execution(return_result=True)

job = adb.collection('<collection_name>').insert(
    document={'name': 'James'},
    return_new=True,
    sync=True)

while job.status() != 'done':
    time.sleep(0.5)

result = job.result()

This code works fine. The value of result on the last line is: {'_id': 'persons/390575', '_key': '390575', '_rev': '_fA5Mlxq---', 'new': {'_key': '390575', '_id': 'persons/390575', '_rev': '_fA5Mlxq---', 'name': 'James'}} The name of my collection is persons.

I am using the latest version of the driver (7.5.2) with ArangoDB 3.10. Can you try the above code on your side and confirm whether it works please? Also, confirm the version of the driver and ArangoDB server that you are using.

0reactions
joowanicommented, Nov 2, 2022

Hey @aaqibb13,

This sounds like a server-side issue. Could you provide the full stacktrace of the error? Please include both the HTTP and the DB error code. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Handling — python-arango documentation
arango.exceptions.ArangoClientError exceptions originate from python-arango client itself. They do not contain error codes nor HTTP request response details ...
Read more >
Why simple aql execute returns AsyncJobResultError when ...
Simple aql execute queries return this error too often. arango.exceptions.AsyncJobResultError: [HTTP 204] job 4739915 not done.
Read more >
ArangoDB-Community python-arango Analysis & Statistics
ArangoDB -Community python-arango code and community statistics, issues, and more. ... AsyncJobResultError` : job 1530399 not done 6 open 🗓️ 1 month ago....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found