Having problem with archive.php

I have been running the archive.php file hourly for years. Everything has always been fine. I started getting an email alert erorr but im not sure what is the cause? It seems to be on one site id=49 and it is one of my busiest sites so more data but it has not got that much more traffic in the past few days as it has had over the past 3 years. I had php memory_limit set to 512M and it has run like that without error for years. I icreased it to 1024M but still same error:

Error in the last Piwik archive.php run:
4 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: http://piwik.surfnetcorp.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=49&period=year&date=last3&format=php&token_auth=4d6c90425415382c7f8ebd36d56aea75&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please che

if i try to run the archive.php manually from the server it processes everything fine up to site 49 and then it stalls a bit and then i get:

archiving period = year for idsite = 49 and it just hangs. up to site 49 it goes VERY fast then i get:

Archiving period = year for idsite = 49…

<?xml version="1.0" encoding="utf-8" ?> ./archive.sh: line 76: 1217 Segmentation fault $CMD [root@piwik cron]#

how can fix this? it seems to do the day and month fine but this is the problem? never had this before. Can anyone help?

see Troubleshooting - Analytics Platform - Matomo