Grafana panels break if requesting a lot of data - zabbix

When I am using a big time range for data (even 7 days), or when I am using multiple queries in the same dashboard, panels begin to break (show no data), if I refresh the dashboard, sometimes they work, sometimes they stay broken. It is not constant for small to medium queries. When I use big queries (for 1 month), if I ask for 2 devices instead of 1, it will 100% fail, while for 1 device, it will most likely work. Now, I don’t know if it is a memory thing I could change on Grafana? Maybe the query or / and answer size?? The logs I get are below:

lvl=eror msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=POST path=/api/datasources/proxy/4 status=500 remote_addr=xxx.xxx.xxx.xxx time_ms=2209 size=0 referer=“https://xxx.xxx.xxx.xxx:3000/d/7427MaCZz/gpat-test?orgId=1&from=now-7d&to=now