Replication error: process could not execute

We recently created transactional replication with PULL option, on one of existing databases.

Error messages:
The process could not execute 'sp_replcmds' on 'my Sql server'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011)

I run into that previously, is it happening on your publisher to distributor DB? Normally it does means the there are not enough time for it to process the replication data, you can set the retention period longer does help, but you should need to review the whole replication setup and ensure that you don't have anything that will take a long time to complete.

I might be going on a wrong direction, but you can surely give it a try.

Yes, this issue is in publisher to distributor DB. I tried this but failed all time.