AllegroGraph lets you specify several configuration options either in the configuration file or in each specific query. To specify an option in the query, AllegroGraph extends the PREFIX syntax. For example, to alter the memory limit, you would pre-pend:
PREFIX franzOption_memoryLimit: <franz:8g>
It's not common to need to do this so if you can include more details on the query, we can help diagnose and improve things. Another useful option is to log the query:
PREFIX franzOption_logQuery: <franz:yes>
Please contact AllegroGraph support at support@franz.com for more help.