Mobile starts to forget Wi-Fi Passwords

I have a Samsung Galaxy Note 3. Earlier it used to remember every Wi-Fi passwords I fed in. However, these days it starts to forget Wi-Fi passwords on some networks. Is it the problem of Wi-Fi router configuration or my android mobile? What is the solution?