If I execute multiple queries using fetchAll(), the php memory increases as if data is stored in memory.
I'm running the queries without storing data in a variable.
How can I free memory once the query is done ?
fetchAll() returns the results as an array. If your submitting a query without needing the results (such as an insert or delete) i would recommend you use the query() or exec() functions. If you are returning the results with fetchAll() then you would need to unset() the stored variable or $variable = NULL; to clear it.
Can you show us the code you have that seems to be consuming the memory?