# Visitation: Recreation and Tourism - RuntimeError: An error occurred on the server

**URL:** <https://community.naturalcapitalalliance.org/t/visitation-recreation-and-tourism-runtimeerror-an-error-occurred-on-the-server/6544>\
**Category:** Software Support\
**Tags:** recreation\
**Created:** [November 18, 2026, 9:47pm UTC](https://community.naturalcapitalalliance.org/t/visitation-recreation-and-tourism-runtimeerror-an-error-occurred-on-the-server/6544 "2026-11-18T21:47:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isabella\_Smith](https://avatars.discourse-cdn.com/v4/letter/i/9d8465/32.png) [@Isabella\_Smith](https://community.naturalcapitalalliance.org/u/Isabella_Smith)\
**Post date:** [November 18, 2026, 9:47pm UTC](https://community.naturalcapitalalliance.org/t/visitation-recreation-and-tourism-runtimeerror-an-error-occurred-on-the-server/6544/1 "2026-11-18T21:47:09Z")

</div>

Hi,

I keep getting the same error when I try to run the model, and I’m not sure why. I’m not sure if it’s something with the AOI or a separate issue. I have the datastack file and log text file attached below. If anyone would be able to take a look and be able to help, it would be much appreciated. Thank you!

[invest\_recreation\_datastack.tgz](https://community.naturalcapitalalliance.org/uploads/short-url/g2bWA5OE3iwwjH6PLPwTAY4cLNI.tgz) (3.1 KB)

[InVEST-recreation-log-2026-11-18–15\_46\_34.txt](https://community.naturalcapitalalliance.org/uploads/short-url/gydNjaAhdEZbAWarIY8sWRnUJJ8.txt) (16.5 KB)

---

<div class="post-metadata">

**Author:** ![dave](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dave/32/70_2.png) [@dave](https://community.naturalcapitalalliance.org/u/dave)\
**Post date:** [November 19, 2026, 2:51pm UTC](https://community.naturalcapitalalliance.org/t/visitation-recreation-and-tourism-runtimeerror-an-error-occurred-on-the-server/6544/2 "2026-11-19T14:51:17Z")

</div>

Hi @Isabella_Smith , thanks for reporting this. I’m looking into it.

---

<div class="post-metadata">

**Author:** ![dave](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dave/32/70_2.png) [@dave](https://community.naturalcapitalalliance.org/u/dave)\
**Post date:** [November 19, 2026, 3:05pm UTC](https://community.naturalcapitalalliance.org/t/visitation-recreation-and-tourism-runtimeerror-an-error-occurred-on-the-server/6544/3 "2026-11-19T15:05:33Z")

</div>

This definitely looks like a bug we will try to address as soon as possible. I think this error will occur for any AOI that includes a relatively large number of points, but I don’t know what that threshold is.

> <https://github.com/natcap/invest/issues/2860>
>
> A recreation server process crashes while it is constructing a local quadtree. R…eviewing the server logs, an exception seems to occur anytime that the worker flushes to disk \_before\_ the quadtree is complete.
> 
> The worker should flush to disk after it reaches a certain threshold of bytes in memory. Or after all the points are added to the \`local\_qt\` in memory. If all points were added before the first flush, things proceed as normal. But if the worker needs to do an intermediate flush, then the process crashes. I'm not sure exactly why or when the exception occurs (during flush or after), but this pattern is exhibited a bunch of times in the log.
> 
> This surely worked in the past, so I'm not sure if there was a breaking change somewhere in the software stack.
> 
> \`\`\`python
> \[2026-11-18 20:24:57.043,TUD\_44d2469f-91d2-441d-9786-8c223dc6aa98,INFO\] 6336000 out of 26728817 points added to local\_qt so far, and n\_nodes in qt 18897 in 5.00s
> \[2026-11-18 20:25:02.069,TUD\_44d2469f-91d2-441d-9786-8c223dc6aa98,INFO\] 6520064 out of 26728817 points added to local\_qt so far, and n\_nodes in qt 18901 in 5.00s
> \[2026-11-18 20:25:07.094,TUD\_44d2469f-91d2-441d-9786-8c223dc6aa98,INFO\] 6700800 out of 26728817 points added to local\_qt so far, and n\_nodes in qt 18913 in 5.00s
> \[2026-11-18 20:25:07.348,natcap.invest.recmodel\_server.buffered\_numpy\_disk\_map,INFO\] Flushing 134217920 bytes in 13660 arrays
> \[2026-11-18 20:25:07.349,natcap.invest.recmodel\_server.buffered\_numpy\_disk\_map,DEBUG\] N\_WORKERS for flush: 2
> \[2026-11-18 20:25:10.724,Pyro5,INFO\] Pyro log configured using built-in defaults, level=DEBUG
> \[2026-11-18 20:25:10.725,Pyro5,INFO\] Pyro log configured using built-in defaults, level=DEBUG
> \[2026-11-18 20:25:10.747,Pyro5.server,DEBUG\] exposing all members of \<class 'Pyro5.server.DaemonObject'\>
> \[2026-11-18 20:25:10.749,Pyro5.server,DEBUG\] exposing all members of \<class 'Pyro5.server.DaemonObject'\>
> \[2026-11-18 20:25:10.760,Pyro5.server,DEBUG\] exposing all members of \<class 'Pyro5.nameserver.NameServer'\>
> \[2026-11-18 20:25:10.761,Pyro5.server,DEBUG\] exposing all members of \<class 'Pyro5.nameserver.NameServer'\>
> \[2026-11-18 20:25:13.102,Pyro5.server,DEBUG\] exposing all members of \<class 'natcap.invest.recreation.recmodel\_server.RecManager'\>
> \[2026-11-18 20:25:13.105,Pyro5.server,DEBUG\] exposing all members of \<class 'natcap.invest.recreation.recmodel\_server.RecManager'\>
> \[2026-11-18 20:25:16.375,natcap.invest.recreation.recmodel\_server,ERROR\] A process in the process pool was terminated abruptly while the future was running or pending.
> Traceback (most recent call last):
> File "/mnt/recreation/invest/env/lib/python3.14/site-packages/natcap/invest/recreation/recmodel\_server.py", line 205, in calculate\_userdays
> results\[label\] = future.result()
> ~~~~~~~~~~~~~ ^^
> File "/mnt/recreation/invest/env/lib/python3.14/concurrent/futures/\_base.py", line 447, in result
> return self.\_\_get\_result()
> ~~~~~~~~~~~~~~~~~ ^^
> File "/mnt/recreation/invest/env/lib/python3.14/concurrent/futures/\_base.py", line 396, in \_\_get\_result
> raise self.\_exception
> concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
> \`\`\`

---

<div class="post-metadata">

**Author:** ![dave](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dave/32/70_2.png) [@dave](https://community.naturalcapitalalliance.org/u/dave)\
**Post date:** [November 19, 2026, 4:28pm UTC](https://community.naturalcapitalalliance.org/t/visitation-recreation-and-tourism-runtimeerror-an-error-occurred-on-the-server/6544/4 "2026-11-19T16:28:56Z")

</div>

@Isabella_Smith I believe the server is running normally again now after having restarted it. I tried your AOI and it completed successfully.
