Perforce Public Knowledge Base - Sync through Perforce Proxy hangs
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Reset Search



Sync through Perforce Proxy hangs

« Go Back


The "p4 sync" command does not respond while transferring files through the proxy.

First, determine if the hang occurs on one particular file or if it hangs on a different file each try.

  1. The p4 sync command hangs on a different file each time.

If rpc.deliver.duplex=0, we will disable the TCP duplex acknowledgement until the very end of the TCP conversation. This will improve performance. Unfortunately, this sometimes will cause a sync to hang. If the "p4 sync" command hangs during a large sync, run:

p4 configure set rpc.deliver.duplex=1

If this does not fix the issue, consider setting the configurable back to retain performance using the following command:

p4 configure set rpc.deliver.duplex=0

From the release notes:

#771811 **
    The undocumented tunable rpc.deliver.duplex now defaults to 1.
    This means that the behavior described in change 671142 is now
    opt-in, rather than opt-out; you must explicitly set
    rpc.deliver.duplex=0 to enable the change 671142 behavior.


  1. The p4 sync command hangs on the same file each time.

Remove the offending archive file that corresponds to this file revision. The issue can be with the file on the proxy cache. See if the same file can be retrieved directly from the server and if so, try removing the archive file from the proxy cache.

The archive file will have a name like filename.ext,v or will be found in the directory filename.ext,d as '1.nnn.gz', where 'nnn' is the change number that created this revision. If you cannot locate it, run the following command, using the depot, directory, filename and revision 'n' as appropriate for your file.

p4 fstat -Oc //depot/dir/filename.ext#n
The line starting '... lbrFile' identifies the archive file containing this revision's content.


  1. Sync is hanging on pdb.lbr

Check whether processes are hung on the pdb.lbr. For example, on Linux you can run the following command (as root) to see if many processes are accessing the pdb.lbr file.

/usr/sbin/lsof /home/perforce/pdb.lbr | wc -l

You can disable pdb.lbr by starting the proxy with the -S flag as seen in the P4P options section of the documentation. 

If the above does not work, you may need a process trace such as strace or dtruss, or a network trace like Wireshark.

Related Links



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255