Everything works ok, and after hours, it fails. Later, it works again. Same problem occurred before with a different SSR.
That sounds like a thermal problem. The SSR will generate about 28 watts of heat. Do you have a big enough heat sink? See: http://www.power-io.com/products/heatsinks.htm
The heat sink needs to be installed so the air can go up and through the fins. A heat sink that is installed horizontally is only half as effective. A "small" amount of thermal grease is needed. The SSR needs to be firmly screwed to the heat sink.
If an SSR overheats, it can "lock on".