Our real estate website sends email notifications when properties come on the market matching users saved search criteria.
I have a PHP script that runs on the cronjob to process the searches.
The system now has over 40,000 users. I ran into an issue where I exhausted the PHP memory size. As the system grows I can continue to increase the memory size in php.ini but would like to find a more robust way to do this.
Is there a more scalable way to accomplish this? Should I build something in a more robust language? Perhaps a threaded application in Java or Python?