Manage logic reasoners
Logic reasoners run the definitions and queries behind PyRel semantic models. This guide explains how logic reasoners are created, how to inspect and manage them, and when to step in manually instead of relying on PyRel’s default behavior.
- The RAI Native App is installed and usable in your Snowflake account.
- You can run SQL in Snowflake with an active warehouse.
- You use the
eng_userapplication role to inspect logic reasoners. - You use the
eng_adminapplication role to suspend, resume, alter, and delete logic reasoners.
What logic reasoners do
Section titled “What logic reasoners do”Every semantic model needs a logic reasoner. Logic reasoners process model definitions, evaluate queries, and run the logic workloads behind normal PyRel model use.
By default, each user gets a dedicated logic reasoner. When a user queries a model, PyRel resumes the configured logic reasoner if it is suspended or creates one if it does not exist.
Which compute pools host logic reasoners
Section titled “Which compute pools host logic reasoners”Logic reasoners run in app-managed compute pools. You do not create or manage these pools directly, but you do choose logic reasoner sizes that map to them.
| Compute pool | Size | Supported cloud platforms | Used for |
|---|---|---|---|
RELATIONAL_AI_HIGHMEM_X64_S | HIGHMEM_X64_S | AWS, Azure | Small logic workloads and the default logic reasoner size. |
RELATIONAL_AI_HIGHMEM_X64_M | HIGHMEM_X64_M | AWS, Azure | Medium logic workloads. |
RELATIONAL_AI_HIGHMEM_X64_L | HIGHMEM_X64_L | AWS only | Large logic workloads on AWS. |
RELATIONAL_AI_HIGHMEM_X64_SL | HIGHMEM_X64_SL | Azure only | Large logic workloads on Azure. |
How logic reasoners are created
Section titled “How logic reasoners are created”PyRel creates logic reasoners automatically. Users can configure the name and size of the logic reasoner that PyRel creates for them.
When a user runs a query that needs a logic reasoner:
- PyRel checks whether the configured reasoner exists and is
READY. - If it is
READY, PyRel sends the query to that reasoner. - If it is not
READY, PyRel resumes it and waits for it to becomeREADY. - If it does not exist, PyRel creates it using the configured size, or
HIGHMEM_X64_Sif no size is configured.
The default logic reasoner settings are:
| Setting | Behavior |
|---|---|
| Name | Defaults to the Snowflake username with dots replaced by underscores. |
| Size | Defaults to HIGHMEM_X64_S. |
| Auto-suspend | Defaults to 60 minutes of inactivity for newly created reasoners when you do not set a different value. |
How logic reasoners handle jobs
Section titled “How logic reasoners handle jobs”One logic reasoner can process more than one job at a time. Each reasoner supports up to 8 concurrent jobs and a queue capacity of 128 jobs.
How logic reasoners are managed
Section titled “How logic reasoners are managed”Logic reasoners are fully managed by PyRel, including creating them if a semantic model needs one. Each PyRel user gets a dedicated logic reasoner.
As an admin, you can perform the following actions on logic reasoners:
| What to do | When to do it |
|---|---|
| View all logic reasoners | When you want to confirm that a logic reasoner exists and see its high-level state. |
| Verify that a logic reasoner is ready | When you want to confirm that one specific logic reasoner is usable with its expected size and settings. |
| Change a logic reasoner’s auto-suspend settings | When you want to trade off lower cost against lower startup latency. |
| Manually suspend a logic reasoner | When you want to stop it from consuming compute while it is not needed. Jobs sent to a suspended reasoner fail until the reasoner is resumed again. |
| Manually resume a suspended logic reasoner | When you need it available before the next query or when you want to confirm that the reasoner itself can start normally. |
| Delete a logic reasoner | When you no longer want to keep that reasoner instance or its current configuration. Deletion is stronger than suspension because it removes the reasoner entirely. |
View all logic reasoners
Section titled “View all logic reasoners”Requires the eng_user application role.
Use the list view when you want to confirm that a logic reasoner exists and see its high-level state.
SELECT *FROM relationalai.api.reasonersWHERE TYPE = 'logic';Start with NAME, SIZE, STATUS, AUTO_SUSPEND_MINS, and SUSPENDS_AT.
Those columns usually tell you whether the reasoner is ready to use, scheduled to suspend, or worth inspecting in more detail.
Verify that a logic reasoner is ready
Section titled “Verify that a logic reasoner is ready”Requires the eng_user application role.
Use the detail view when you want to confirm that one specific logic reasoner is usable with its expected size and settings.
CALL relationalai.api.get_reasoner('logic', 'my_reasoner');Confirm the following fields first:
STATUS = READYSIZEmatches the expected instance familyAUTO_SUSPEND_MINSmatches the current inactivity settingRUNTIME.compute_poolmatches the expected logic reasoner pool
If the reasoner exists but is not yet READY, wait for provisioning to complete and run the check again.
If it remains unavailable, continue with the troubleshooting section on this page.
Change a logic reasoner’s auto-suspend settings
Section titled “Change a logic reasoner’s auto-suspend settings”Requires the eng_admin application role.
Logic reasoners can be configured to automatically suspend after a period of inactivity, which can help reduce costs when logic workloads are infrequent. By default, newly created logic reasoners suspend after 60 minutes of inactivity unless you set a different value, but you can change this setting based on your workload patterns.
Execute the following to change the auto-suspend timer for a logic reasoner named my_reasoner to 30 minutes:
CALL relationalai.api.alter_reasoner_auto_suspend_mins('logic', 'my_reasoner', 30);Set the value to 0 to disable auto-suspension.
Manually suspend a logic reasoner
Section titled “Manually suspend a logic reasoner”Requires the eng_admin application role.
If you need to suspend a logic reasoner immediately, rather than waiting for the auto-suspend timer, you can do so manually.
Run the following to suspend a logic reasoner named my_reasoner:
CALL relationalai.api.suspend_reasoner('logic', 'my_reasoner');Use get_reasoner() to check the reasoner’s status and confirm that it has suspended successfully.
Manually resume a suspended logic reasoner
Section titled “Manually resume a suspended logic reasoner”Requires the eng_admin application role.
PyRel will automatically resume a logic reasoner when it needs to run a query, but you can also resume it manually if you want it available immediately.
Run the following to resume a logic reasoner named my_reasoner:
CALL relationalai.api.resume_reasoner_async('logic', 'my_reasoner');It may take a few minutes for the reasoner to start up and become READY again.
Use get_reasoner() to check the reasoner’s status and confirm that it has resumed successfully.
Delete a logic reasoner
Section titled “Delete a logic reasoner”Requires the eng_admin application role.
Delete a logic reasoner when you no longer want to keep that reasoner instance or its current configuration. Deletion is stronger than suspension because it removes the reasoner entirely.
CALL relationalai.api.delete_reasoner('logic', 'my_reasoner');When a reasoner is deleted, all current and queued jobs are cancelled. If PyRel is still configured to use that reasoner name, it can recreate the reasoner later when needed.
Troubleshoot common issues with logic reasoners
Section titled “Troubleshoot common issues with logic reasoners”Use this table to match common logic-reasoner problems to the right next action:
| Symptom | Likely cause | What to do next |
|---|---|---|
| The expected logic reasoner does not exist. | PyRel has not needed it yet, or the configured name does not match the reasoner you expected. | Confirm the current reasoners.logic configuration, then trigger the workflow that should use it or create the reasoner manually. |
The reasoner exists but is not READY. | Provisioning is still in progress, or startup has stalled. | Wait briefly and run get_reasoner() again. If it does not recover, check broader app status. |
| The reasoner resumes slowly even though nothing is wrong. | The reasoner is auto-suspended and needs to start again. | Increase AUTO_SUSPEND_MINS or use warm reasoners if startup latency is the main problem. |
The reasoner is READY, but queries are still slow. | Jobs may be queued or the reasoner may be under sustained load. | Use Monitor reasoner usage to inspect demand, CPU, and memory before changing the lifecycle settings. |
For adjacent workflows, see Manage the Native App and Configure reasoners.