Opened 10 years ago

Closed 9 years ago

# PerforceError: Request too large

Reported by: Owned by: jfoster ttressieres highest PerforcePlugin blocker 0.10

### Description

I've tried using version 0.4.2 and trunk of perforceplugin and both versions result in a similar error trace like this:

=======================

Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\trac\web\main.py", line 387, in dispatch_request
dispatcher.dispatch(req)
File "C:\Python24\Lib\site-packages\trac\web\main.py", line 238, in dispatch
resp = chosen_handler.process_request(req)
File "C:\Python24\Lib\site-packages\trac\versioncontrol\web_ui\browser.py", line 113, in process_request
req.hdf['browser'] = {
File "C:\Python24\lib\site-packages\tracperforce-0.4.2-py2.4.egg\p4trac\api.py", line 743, in _get_rev
return self._node.change
File "C:\Python24\lib\site-packages\tracperforce-0.4.2-py2.4.egg\p4trac\repos.py", line 700, in _get_change
wildcard=u'...')
File "C:\Python24\lib\site-packages\tracperforce-0.4.2-py2.4.egg\p4trac\repos.py", line 1521, in _runChanges
raise PerforceError(output.errors)
PerforceError: Request too large (over 100000); see 'p4 help maxresults'.

=======================


The only thing that I'm not too sure about is the connection string setting I have for the trac.ini repository_dir value.

Do I have my p4 connection string right in my settings below, or does the repository path need to start with a double forward slash "", or perhaps I need to take off the ending forward slash "/", or perhaps I need to end the path with a forward slash and ellipses "/..."?

Here's the software I'm using:

• Python = 2.4
• Trac = 0.10.2
• P4 Server = 2006.1
• PyPerforce = 0.3a1
• PyProtocols = 0.9.3
• SetupTools = 0.6c3

My p4 trac.ini settings look like:

[components]
p4trac.* = enabled

[trac]
repository_type = perforce

[perforce]
port = perforce:1666
unicode = 0


Thanks in advance for any help!!

### comment:1 Changed 10 years ago by ttressieres

• Status changed from new to assigned

Hi, thank you to try to use PerforcePlugin...

Firstly in your trac.ini, if you use the repository_dir variable, you don't need any more the [perforce] section. But by now the path is not correctly handled.

I've tried to reproduce your defect, i use a P4 group with MaxResults set to 10, then i used Trac and i reproduce the bug :-(

I tried on a command prompt:

  p4 changes -l -s submitted -m 1 //...@46


and i saw the same error even if i use "-m 1"

If i try:

  p4 changes -l -s submitted -m 1


without file or revRange then all work fine

So i think it's a limitation of Perforce, a workaround is to use a special user with a special group and allow unlimited MaxResults

Send me all your questions or remarks

### comment:2 Changed 9 years ago by lewisbaker

• Resolution set to invalid
• Status changed from assigned to closed

I think the issue here is that when running:

p4 changes -l -s submitted -m 1


Perforce is using MaxResults to limit the number of changes.

However when running

p4 changes -l -s submitted -m 1 //...@46


Perforce is using MaxResults to limit the number of file revisions that match "...@46" when scanning for changes.

As previously mentioned by Thomas, using a special user with an unlimited MaxResults value should get this working. However, it is still going to be putting load on your Perforce server. Another alternative is to use a more restrictive depot/client view to reduce the number of revisions that could be scanned.