On M3 Max 128GB 100 calls of either ollama.generate or ollama.chat doesn't cause hang. This is due to the speed in which the system completes the task in under 30 minutes.
On M3 Max 128GB 45 minutes of repeated calls of either ollama.generate or ollama.chat causes a hang. The issue (https://github.com/ollama/ollama/issues/2339) likely had the 100 calls take 30+ minutes with their system.
On M3 Max 128GB tested 30 minute loops and it failed 3/4 tests. Not sure why 1/4 passed - increased loop to 45 minutes in tests for reproducible hang.
Based on this issue: https://github.com/ollama/ollama/issues/2339
Script runs 4 tests.
Findings