Docker Swarm overlay network - unable to connect host between the container is not the same node

I have 2 nodes added to swarm:
I have a problem, phpfpm container can’t connect to db container via service name on my docker-stack.yml.

services:
    phpfpm:
       image: registry.com:5000/phpfpm

Because db container just only started in manager node.

Thank in advance.