Ali ibn Abi-Talib (as): “Be insistent in praying and requesting (from God), so that He opens the doors of His mercy upon you. Do not feel disheartened from the delay in achieving that request, as what you are granted is due to the measure of (your) asking. Or perhaps it is delayed so that you request for it longer or so that (God’s) giving becomes more complete. Or it may be that you have requested something that you haven’t received (exactly), but have or will receive something greater in this world or the next. Or (it may be) that something may not have been given to you for a greater good of yours. Perhaps some requests, if granted, could have ruined your religion or your worldly life. Indeed your request should be for things whose benefits are (long) lasting and burdens are away from you.”

Ref: Bihar al-Anwar – Vol. 74. Pg. 205