home automation doesn't work

I tried with the basic home automation technique with arduino uno R3 and ESP8266 using the blynk appication. It works perfectly with the built-in led in the arduino board and also with external Led connected directly to the arduino.
But on trying with a 320V bulb connected to a relay module and then to the arduino, the ESP gets disconnected itself after 2 or 3 trials. On working with LEDs it goes on uninterrupted.
Can I know what is the problem with the model and what else should I change to make it work properly.

Did you connect the green wire? And are you sure, line 42 of your code is correct?

Here Iv’e attached a copy of the code.
And I don’t understand about the green wire that you specified.

Blynk_Blinking_led.ino (1.55 KB)

Aadav:
Here Iv'e attached a copy of the code.
And I don't understand about the green wire that you specified.

The green wire is located in the schematic you provided.

Could you post the error message the ESP8266 is showing?

There is no error message shown.
It connects successfully on uploading from my laptop to the arduino board, but the problem is that it get disconnected from the wifi automatically after some 3 trials.