ESP01 connection problem

I am making a project where i need to control two relays with ESP01. Schematic is bellow:

Sketch is:

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "*********";
char ssid[] = "***********";
char pass[] = "*************";

#include "Arduino.h"
#include "PCF8574.h"
PCF8574 pcf8574(0x20, 0, 2);

BLYNK_WRITE(V1){
  int pinValue1 = param.asInt();
  pcf8574.digitalWrite(P7, pinValue1);
}
BLYNK_WRITE(V2){
  int pinValue2 = param.asInt();
  pcf8574.digitalWrite(P6, pinValue2);
}
void setup() {
  Blynk.begin(auth, ssid, pass);
  pcf8574.begin();
  pcf8574.pinMode(P7, OUTPUT);
  pcf8574.pinMode(P6, OUTPUT);
  pcf8574.digitalWrite(P7,HIGH);
  pcf8574.digitalWrite(P6,HIGH);
}

void loop() {
  Blynk.run();
}

Power supply i think is ok. It is 5V/3A with AMS1117 regulator. When i power it up, blue LED on ESP01 blink and i can see its IP address on my router. After that i can change state from my phone. But, after a minute or two (sometimes 10 min, sometime 10 sec), i can not change state from my phone. When i check in my router i can see that it is not connected in my local network. After a reset it shows up again. Sometimes i take few resets.

Whole project is on a PCB already soldered, so there shouldn’t be bad contact. I double check joints, but there is always BUT. If any suggestion, please tell me. Or what should i check…