Multiple iFrames and "104: Connection reset by peer"

0

I wonder if the following happened to someone else ...

Suppose we have domain A and B;

A -> homesite.com
B -> embebedsite.com

If from A, I insert several iframes to B, the PHP service stops with error 104: Connection reset by peer.

However when we do the same, but in the html code of A we indicate a different "id" to each iframe, then the service works.

What could be happening? Could it be a case of iFrame Injection? Would a solution be possible without the need to add "id" in the iframes of A?

Thank you!

    
asked by O.Palm 12.12.2017 в 19:32
source

1 answer

0

I could see why the service crash occurred.

The javascript codes inside the iframes request asynchronous requests from the resources, and for this reason the PHP service ended up falling because it can not attend the resources and derive them at the same time to each iframe request.

After several tests, I understood which factors helped to assimilate the situation better and solve the problem, I detail them below;

  
  • Add "id" to the "iframe" tags.
  •   
  • Avoid the "async" attribute in the javascript "script", or libraries that load the resources in this way.
  •   
  • In the PHP service, change the service listener by TCP, instead of socket. ("file.sock" to "127.0.0.1:9000")
  •   
  • Increase waiting times related to requests (in the web service, apache, nginx etc)
  •   

A greeting.

    
answered by 26.12.2017 / 08:44
source