# Py2neo script has stopped, but query continues

**URL:** https://community.neo4j.com/t/py2neo-script-has-stopped-but-query-continues/61282
**Category:** Python
**Tags:** cypher
**Created:** [March 6, 2023, 2:13pm UTC](https://community.neo4j.com/t/py2neo-script-has-stopped-but-query-continues/61282 "2023-03-06T14:13:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![hyzhaors](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/hyzhaors/32/27883_2.png) [@hyzhaors](https://community.neo4j.com/u/hyzhaors)
#### Post date: [March 6, 2023, 2:13pm UTC](https://community.neo4j.com/t/py2neo-script-has-stopped-but-query-continues/61282/1 "2023-03-06T14:13:28Z")

</div>

I used py2neo to make a query, but the query is complex, so I stopped the py2neo script early, but the query continues in neo4j server. So how to set when the py2neo script stops, The query in the neo4j server also stops? Or can the official neo4j python library meet my needs? What shall I do?  
thank you！

---

<div class="post-metadata">

### Author: ![rouven\_bauer](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/rouven_bauer/32/16547_2.png) [@rouven\_bauer](https://community.neo4j.com/u/rouven_bauer)
#### Post date: [March 6, 2023, 2:15pm UTC](https://community.neo4j.com/t/py2neo-script-has-stopped-but-query-continues/61282/2 "2023-03-06T14:15:31Z")

</div>

[Manage queries - Operations Manual](https://neo4j.com/docs/operations-manual/current/monitoring/query-management/#query-management-terminate-queries) might be what you're looking for. There are queries to list and kill running transactions.

---

<div class="post-metadata">

### Author: ![hyzhaors](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/hyzhaors/32/27883_2.png) [@hyzhaors](https://community.neo4j.com/u/hyzhaors)
#### Post date: [March 7, 2023, 1:59am UTC](https://community.neo4j.com/t/py2neo-script-has-stopped-but-query-continues/61282/3 "2023-03-07T01:59:13Z")

</div>

Thank you very much. I will do a test.

---

<div class="post-metadata">

### Author: ![grantseanw](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/grantseanw/32/27759_2.png) [@grantseanw](https://community.neo4j.com/u/grantseanw)
#### Post date: [March 7, 2023, 1:57pm UTC](https://community.neo4j.com/t/py2neo-script-has-stopped-but-query-continues/61282/4 "2023-03-07T13:57:26Z")

</div>

Also, be aware that the last version of py2neo was from 2021 so might be worth looking at using the official neo4j python driver for future
