i am using a esp8266-12e to switch mains 220v power . when i am using a 5v opto isolated mechanical relay the esp resets when i turn the mains on or off . without mains load the relay functions flawlessly.
when with the same setup i use a 5v solid state relay module the setup runs perfectly without reseting the esp.