Under Putty Reconfiguration>Connection>Seconds between keepalives (0 to turn off) I added 300 but that value is reset to 0 after I reopen putty.
To store your settings you should go to
Session category in the tree, type or select the preset in field
Saved Sessions, and press
Save button (this will store settings in all categories to your preset).
When you execute Putty next time you will be able to load the preset, and Connection settings will be loaded also.