Re: [fossil-users] fossil server on a small private LAN

2017-12-29 Thread Olivier Mascia
Le 29 déc. 2017 à 12:31, Richard Hipp  a écrit :

>> In my own code, I generally end up including:
>> 
>> #include 
>> #include 
>> #include 
>> 
>> in code units using MS winsock.
>> 
>> I'll soon see what would fit for fossil win32 networking.
> 
> Please keep in mind that Fossil current compiles using both MSVC and
> MinGW.  We'd like to continue supporting both build environments.
> Thanks for your help!

Understood. I’ll keep that in mind. Good opportunity for me to refresh a MinGW 
setup on my computer!

-- 
Best regards, Meilleures salutations, Met vriendelijke groeten,  
Olivier Mascia (from mobile device)



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-29 Thread Richard Hipp
On 12/29/17, Olivier Mascia  wrote:
>> Le 29 déc. 2017 à 01:17, Richard Hipp  a écrit :
>>
>> On 12/28/17, Olivier Mascia  wrote:
>>> To get a proper dual-stack socket, the socket must be created with
>>> AF_INET6
>>> first then setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,...)
>>
>> When I try to do this I get:  error C2065: 'IPV6_V6ONLY': undeclared
>> identifier
>>
>> MSVC 2015
>
> In my own code, I generally end up including:
>
> #include 
> #include 
> #include 
>
> in code units using MS winsock.
>
> I'll soon see what would fit for fossil win32 networking.

Please keep in mind that Fossil current compiles using both MSVC and
MinGW.  We'd like to continue supporting both build environments.
Thanks for your help!

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-29 Thread Olivier Mascia
> Le 29 déc. 2017 à 01:17, Richard Hipp  a écrit :
> 
> On 12/28/17, Olivier Mascia  wrote:
>> To get a proper dual-stack socket, the socket must be created with AF_INET6
>> first then setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,...)
> 
> When I try to do this I get:  error C2065: 'IPV6_V6ONLY': undeclared 
> identifier
> 
> MSVC 2015

In my own code, I generally end up including:

#include 
#include 
#include 

in code units using MS winsock.

I'll soon see what would fit for fossil win32 networking.

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-29 Thread Olivier Mascia
> Le 29 déc. 2017 à 02:30, Richard Hipp  a écrit :
> 
> On 12/28/17, Thomas  wrote:
>> 
>> This could be an option too:
>> #ifndef IPV6_V6ONLY
>> #define IPV6_V6ONLY 27
>> #endif
> 
> It compiles with that.  But it doesn't work.  So for now, I think
> we'll just stick with IPv4-only servers for "fossil server" on windows
> - at least until somebody can suggest a way to fix it.

I'll happily take on that task, but it will probably be after Jan 2.

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Richard Hipp
On 12/28/17, Thomas  wrote:
>
> This could be an option too:
> #ifndef IPV6_V6ONLY
> #define IPV6_V6ONLY 27
> #endif

It compiles with that.  But it doesn't work.  So for now, I think
we'll just stick with IPv4-only servers for "fossil server" on windows
- at least until somebody can suggest a way to fix it.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Thomas

Oh, and this is not a Windows thingy.

For Linux:
#include 
#include 

http://man7.org/linux/man-pages/man7/ipv6.7.html


On 2017-12-29 02:23, Thomas wrote:

On 2017-12-29 01:17, Richard Hipp wrote:

On 12/28/17, Olivier Mascia  wrote:
To get a proper dual-stack socket, the socket must be created with 
AF_INET6

first then setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,...)


When I try to do this I get:  error C2065: 'IPV6_V6ONLY': undeclared 
identifier


MSVC 2015


MSVC 2015 here too, and no error.

Maybe the SDK is too old, no idea.

Check the bottom of 
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738574(v=vs.85).aspx 
.


This could be an option too:
#ifndef IPV6_V6ONLY
#define IPV6_V6ONLY 27
#endif
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Thomas

On 2017-12-29 01:17, Richard Hipp wrote:

On 12/28/17, Olivier Mascia  wrote:

To get a proper dual-stack socket, the socket must be created with AF_INET6
first then setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,...)


When I try to do this I get:  error C2065: 'IPV6_V6ONLY': undeclared identifier

MSVC 2015


MSVC 2015 here too, and no error.

Maybe the SDK is too old, no idea.

Check the bottom of 
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738574(v=vs.85).aspx 
.


This could be an option too:
#ifndef IPV6_V6ONLY
#define IPV6_V6ONLY 27
#endif
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Richard Hipp
On 12/28/17, Olivier Mascia  wrote:
> To get a proper dual-stack socket, the socket must be created with AF_INET6
> first then setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,...)

When I try to do this I get:  error C2065: 'IPV6_V6ONLY': undeclared identifier

MSVC 2015

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Andy Bradford
Thus said Warren Young on Thu, 28 Dec 2017 08:20:21 -0700:

> I'm pretty  sure I've never seen  Fossil crash in the  years I've been
> running it.

I've had it dump  core a few times but those were  generally due to bugs
that were quickly fixed.

Andy
-- 
TAI64 timestamp: 40005a4540f3


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Olivier Mascia
> Le 28 déc. 2017 à 17:37, Olivier Mascia  a écrit :
> 
> The quick/easy/dirty/temporary fix before completing the proper support 
> (server-side) of IPv4+IPv6 would be to simply adjust the hint.ai_family 
> initialisation in http_socket.c::socket_open to read:
> 
> #ifdef _WIN32
>  hints.ai_family = AF_INET;
> #else
>  hints.ai_family = g.fIPv4 ? AF_INET : AF_UNSPEC;
> #endif
> 
> It works nicely for me. Perfectly expected performance of a large clone 
> (needing 250 round-trips) in about 50 seconds. Either using explicitly IPv4 
> in the URL or, with that patch, the proper DNS name.

To further clarify, here is the patching I did today based on fossil version 
2.5 [f4a9df4dd0] 2017-12-23 04:21:41 UTC.
There is that discussed temporary limitation of the client-side (on Windows) to 
resolving only to IPv4 (to match the server being only IPv4) and another small 
change which is to call shutdown() on sockets before calling closesocket().
It is more interesting in winhttp.c than in http_socket.c, because it will help 
the windows TCP stack to more cleanly and generally more quickly free up kernel 
resources by sending the proper TCP FIN before getting rid of the socket. Kind 
of warning "I'm pulling the plug" before actually doing so.
Don't expect measurable performance improvement from that. The only benefit 
would be seen under rare situations when the server machine has thousands of 
other sockets active (maybe other softwares than Fossil). And even so, would be 
seen only if those other software also behave 'by the book'.

Index: src/http_socket.c
==
--- src/http_socket.c
+++ src/http_socket.c
@@ -119,10 +119,12 @@
 ** is a no-op.
 */
 void socket_close(void){
   if( iSocket>=0 ){
 #if defined(_WIN32)
+if (shutdown(iSocket, 1/*SD_SEND*/) == 0) /* Initiates the shutdown, 
sending TCP 'FIN' */
+  shutdown(iSocket, 0/*SD_RECEIVE*/);   /* Now denies receive */
 closesocket(iSocket);
 #else
 close(iSocket);
 #endif
 iSocket = -1;
@@ -147,11 +149,15 @@
   char zRemote[NI_MAXHOST];
 
   socket_global_init();
   socket_close();
   memset(, 0, sizeof(struct addrinfo));
+#ifdef _WIN32
+  hints.ai_family = AF_INET;
+#else
   hints.ai_family = g.fIPv4 ? AF_INET : AF_UNSPEC;
+#endif
   hints.ai_socktype = SOCK_STREAM;
   hints.ai_protocol = IPPROTO_TCP;
   sqlite3_snprintf(sizeof(zPort),zPort,"%d", pUrlData->port);
   rc = getaddrinfo(pUrlData->name, zPort, , );
   if( rc ){

Index: src/winhttp.c
==
--- src/winhttp.c
+++ src/winhttp.c
@@ -214,10 +214,12 @@
   }
 
 end_request:
   if( out ) fclose(out);
   if( in ) fclose(in);
+  if (shutdown(p->s, 1/*SD_SEND*/) == 0) /* Initiates the shutdown, sending 
TCP 'FIN' */
+shutdown(p->s, 0/*SD_RECEIVE*/);   /* Now denies receive */
   closesocket(p->s);
   file_delete(zRequestFName);
   file_delete(zReplyFName);
   file_delete(zCmdFName);
   fossil_free(p);
@@ -277,10 +279,12 @@
   }
 
 end_request:
   if( out ) fclose(out);
   if( in ) fclose(in);
+  if (shutdown(p->s, 1/*SD_SEND*/) == 0) /* Initiates the shutdown, sending 
TCP 'FIN' */
+shutdown(p->s, 0/*SD_RECEIVE*/);   /* Now denies receive */
   closesocket(p->s);
   file_delete(zRequestFName);
   file_delete(zReplyFName);
   fossil_free(p);
 }

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Olivier Mascia
> Le 28 déc. 2017 à 17:18, Richard Hipp  a écrit :
> 
> There is one thread per connection in the parent process, which allows
> the parent to manage multiple simultaneous incoming connections.  As
> each thread gets a complete HTTP request, it writes that request into
> a temporary file, uses fossil_system() to invoke the "fossil http"
> command to handle the request and store the reply into a second
> temporary file, then the thread reads the reply and sends it back over
> the wire.  Finally, the two temporary files are deleted.
> 
> The fork() approach is much nicer, but we don't have fork() on
> windows.  I'm open to suggests on better ways to do this.

Unless your intend is to be able to support thousands of simultaneous requests, 
there is few to earn in changing this scheme.  The scaling limitation would be 
that spawning of sub-processes.  Overcoming that is possible, but is a major 
redesign of the very clear and simple winhttp.c you currently have.

I wouldn't loose precious time in that area.

As pointed in my other message, the main culprit of occasional sluggish windows 
behaviour when fossil reaches out a windows fossil server is that the server 
inadvertently implements an IPv4-only listening socket while the client is 
dual-stacked. It can loose seconds (in the order of multiple times 10 or 20 
seconds) per IPv6 connection attempt not answered by the remote server before 
finally trying an IPv4 address and succeeding its connection.

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Olivier Mascia
> Le 28 déc. 2017 à 16:55, Olivier Mascia  a écrit :
> 
>> I'll experiment with the fossil code here.  Familiarizing with winhttp.c for 
>> now.
> 
> I haven't yet come to bottom of it, but using IP (IPv4) in the URL (instead 
> of name) changes it all!!  There seem to be a high price paid in resolving 
> the server name on each round trip (from client). This or, due to dual-stack 
> being the norm on Windows, client connections loose time trying IPv6 
> (generally preferred by Windows when DNS reports both  and A records for 
> a name) before falling back to IPv4.
> 
> My test now runs (the network portion, excluding rebuilding metadata and next 
> things) within 50 seconds for all 250 round-trips and 102700 artifacts 
> received. It was close to 1 hour and a half before.
> 
> I'm further analysing http_socket.c (socket_open) following this discovery.

Okay, it revolves around g.fIPv4 which only appears in these lines:

Search "fIPv4" (3 hits in 3 files)
  I:\fossil\src\http_socket.c (1 hit)
Line 154:   hints.ai_family = g.fIPv4 ? AF_INET : AF_UNSPEC;
  I:\fossil\src\main.c (1 hit)
Line 159:   int fIPv4;  /* Use only IPv4, not IPv6. --ipv4 
*/
  I:\fossil\src\url.c (1 hit)
Line 382:   if( find_option("ipv4",0,0) ) g.fIPv4 = 1;

In http_socket.c it is tested to configure hints.ai_family with either AF_INET 
or AF_UNSPEC in order to query for only IPv4 or both IPv6 and IPv4. The server 
name resolution made by the client then returns both IPv6 and IPv4 because I 
didn't mentioned "--ipv4" option anywhere in my commands.  Further, enumerating 
the IPs, the code attempts socket creation *and* connection, trying the next 
returned IP if the connect fails.

Sounds good isn't it?
No. Because the server side never ever initialised a listening socket for 
dual-stack. It listens on IPv4 only. Leading to long pauses from the client 
trying IPv6 connections, unresponding, before trying next one which might 
happen to be IPv4 and reachable.

The server code do initialize its listening socket as this:

s = socket(AF_INET, SOCK_STREAM, 0);

That (on Windows) gives you an IPv4-limited socket.
To get a proper dual-stack socket, the socket must be created with AF_INET6 
first then setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,...) should be called to 
remove the "only IPv6" attribute from the socket.  See 
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738574(v=vs.85).aspx.

That is not the only thing to do because the test that follows on the validity 
of the IP address would have to be adjusted to take IPv4/IPv6 into account.

So the current situation is simply that when acting as server, fossil.exe setup 
an IPv4-only listening socket, while by default it will attempt dual-stack 
client connections, loosing a huge amount of time re-establishing those 
connections.  Add to this that recent Windows will reorder the IPs returned by 
getaddrinfo() as to list IPv6 first when the OS looks like having proper IPv6 
internet connectivity.

The quick/easy/dirty/temporary fix before completing the proper support 
(server-side) of IPv4+IPv6 would be to simply adjust the hint.ai_family 
initialisation in http_socket.c::socket_open to read:

#ifdef _WIN32
  hints.ai_family = AF_INET;
#else
  hints.ai_family = g.fIPv4 ? AF_INET : AF_UNSPEC;
#endif

It works nicely for me. Perfectly expected performance of a large clone 
(needing 250 round-trips) in about 50 seconds. Either using explicitly IPv4 in 
the URL or, with that patch, the proper DNS name.

I'll see to help with proper Windows dual-stack server socket in January.

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Richard Hipp
On 12/28/17, Warren Young  wrote:
>>
>> Even the Windows server starts a new process to handle each request.
>> It just does so using system() rather than fork().
>
> That leaves me wondering what the threads are used for then, if not to
> implement a thread-per-connection model.

There is one thread per connection in the parent process, which allows
the parent to manage multiple simultaneous incoming connections.  As
each thread gets a complete HTTP request, it writes that request into
a temporary file, uses fossil_system() to invoke the "fossil http"
command to handle the request and store the reply into a second
temporary file, then the thread reads the reply and sends it back over
the wire.  Finally, the two temporary files are deleted.

The fork() approach is much nicer, but we don't have fork() on
windows.  I'm open to suggests on better ways to do this.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Warren Young
On Dec 28, 2017, at 9:11 AM, Richard Hipp  wrote:
> 
> On 12/28/17, Warren Young  wrote:
>> 
>> drh, I seem to recall messages about non-free()’d buffers in the Fossil
>> server code, where the patch was rejected with the argument that the forked
>> child is about to die anyway, so why bother freeing the buffer.  That
>> doesn’t really apply in a single-process server, as I expect applies on the
>> Windows side.  Will Fossil server leak memory on Windows?
> 
> Even the Windows server starts a new process to handle each request.
> It just does so using system() rather than fork().

That leaves me wondering what the threads are used for then, if not to 
implement a thread-per-connection model.

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Richard Hipp
On 12/28/17, Warren Young  wrote:
>
> drh, I seem to recall messages about non-free()’d buffers in the Fossil
> server code, where the patch was rejected with the argument that the forked
> child is about to die anyway, so why bother freeing the buffer.  That
> doesn’t really apply in a single-process server, as I expect applies on the
> Windows side.  Will Fossil server leak memory on Windows?

Even the Windows server starts a new process to handle each request.
It just does so using system() rather than fork().  We have to be
careful about leaks in the parent process that is sitting there
listening for requests and spawning children to handle each request.
But there is no need to be concerned with memory leaks in the
children, because they are all short-lived.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Warren Young
On Dec 28, 2017, at 8:55 AM, Olivier Mascia  wrote:
> 
>> Le 28 déc. 2017 à 15:42, Olivier Mascia  a écrit :
>> 
>> I'll experiment with the fossil code here.  Familiarizing with winhttp.c for 
>> now.
> 
> I haven't yet come to bottom of it, but using IP (IPv4) in the URL (instead 
> of name) changes it all!!

That means your domain resolution configuration has a problem.  The first 
lookup will take significant time even on a small quiet LAN, but throughout the 
entire remaining Fossil clone operation, it will remain cached in the local 
machine, so it should look it up again near-instantly.  (See ipconfig /flushdns)

If DNS isn’t working right, Windows might be falling back to NetBIOS name 
discovery or some other horrid case.

> due to dual-stack being the norm on Windows, client connections loose time 
> trying IPv6 (generally preferred by Windows when DNS reports both  and A 
> records for a name) before falling back to IPv4.

Easy to try: uncheck IPv6 in the network control panel.  I’ve seen that clear 
problems up on Windows before.

If it does fix it, it might mean you need to set up IPv6 DNS.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Olivier Mascia
> Le 28 déc. 2017 à 15:42, Olivier Mascia  a écrit :
> 
> I'll experiment with the fossil code here.  Familiarizing with winhttp.c for 
> now.

I haven't yet come to bottom of it, but using IP (IPv4) in the URL (instead of 
name) changes it all!!  There seem to be a high price paid in resolving the 
server name on each round trip (from client). This or, due to dual-stack being 
the norm on Windows, client connections loose time trying IPv6 (generally 
preferred by Windows when DNS reports both  and A records for a name) 
before falling back to IPv4.

My test now runs (the network portion, excluding rebuilding metadata and next 
things) within 50 seconds for all 250 round-trips and 102700 artifacts 
received. It was close to 1 hour and a half before.

I'm further analysing http_socket.c (socket_open) following this discovery.

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Warren Young
On Dec 28, 2017, at 7:42 AM, Olivier Mascia  wrote:
> 
> server on macOS, client on Windows (server 2016 and server 2012 R2) is OK.
> Server and client on same Windows box, through localhost is comparable (just 
> slightly slower) to server macOS and client Windows.

That’s not good.  The localhost connection should be much faster than a LAN 
connection, irrespective of the OSes involved.  I’d expect to see an order of 
magnitude difference in tests not involving the disk.  (Which of course doesn’t 
include these tests, but still!)  Either Windows’ localhost implementation is 
terrible, or the Windows server (software or hardware) has some serious 
slowdown.

drh’s idea of disabling antivirus is one possibility, though a recent SQLite 
benchmark [1] showed that SQLite tended to keep Windows Defender from doing 
much damage by its nature, since antivirus doesn’t re-scan the DB file each 
time more content is added to it.

[1]: https://www.sqlite.org/fasterthanfs.html
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Warren Young
On Dec 28, 2017, at 6:11 AM, Olivier Mascia  wrote:
> 
>   *** time skew *** server is slow by 106.6 seconds

…snip…

> I'll have a close look in the next weeks at the source code of the Windows 
> server feature of Fossil.  The warning "*** time skew *** will certainly be 
> an interesting starting point.

That has nothing to do with the Windows-specific parts of Fossil.  It simply 
means your client and server clocks aren’t synchronized.  One (or both?) of 
them isn’t getting a regular NTP update, or one of them is pointed at an NTP 
server that is itself desynchronized.

Fossil reports this because the skew can be reflected in the file timestamps in 
such a way that it screws up build systems based on timestamps, which is most 
of them.

> Our own software is actually much like Fossil: single process, multi-usages, 
> with its own HTTPS embedded server (using OpenSSL).  (Albeit currently only 
> available on Windows, so we have good experience in that area of HTTP serving 
> on Windows using custom C/C++ code).

The current Windows-specific parts of Fossil server use thread-per-connection, 
according to a recent mailing list message.  As you know, that’s not ideal.  
For a maximum of 10 clients, it’s probably insignificant, but if you could 
rewrite it using WSAEventSelect() or similar, that would be more efficient.

That might be really difficult, though, since the POSIX builds of Fossil server 
use fork() instead, which means the server code probably isn’t written in a way 
that would easily give you the data to ship in an event-driven manner.

drh, I seem to recall messages about non-free()’d buffers in the Fossil server 
code, where the patch was rejected with the argument that the forked child is 
about to die anyway, so why bother freeing the buffer.  That doesn’t really 
apply in a single-process server, as I expect applies on the Windows side.  
Will Fossil server leak memory on Windows?
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Warren Young
On Dec 28, 2017, at 4:26 AM, Olivier Mascia  wrote:
> 
> Is "fossil server" generally deemed sufficient for a small LAN (lab) of let's 
> say < 10 developers each with their own clone ?
> Or should a proper HTTP server be used as front end to SCGI mode of fossil?

That’s how I run Fossil on private civilized LANs.  (As opposed to LANs where 
bad actors are expected to be present.)  I don’t bother with the HTTPS 
front-end proxy in that case.

> cloning a 2 GB repository through http over 1 Gbps LAN is curiously slow and 
> I wonder why.

A Fossil clone is not a linear file copy operation.  The server pulls some data 
from its database, ships it over the network, then the client has to integrate 
that into its local database.  Back and forth it goes until the whole thing is 
transferred.  Then the client’s going to spend a bunch more time reorganizing 
what it received into an optimal format.

This is one reason why Fossil reports round trips during clone and sync 
operations.  It’s good that it’s as low a value as it is, but it isn’t yet “1”, 
the ideal.

> Not that we'll clone every day of course, but it looks so slow that it 
> questions stability.

I’m pretty sure I’ve never seen Fossil crash in the years I’ve been running it.

Keep in mind that sqlite.org runs on Fossil.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Olivier Mascia
> Le 28 déc. 2017 à 15:04, Richard Hipp  a écrit :
> 
> On 12/28/17, Richard Hipp  wrote:
>> 
>> Running multiple copies of the new fossil-stress.tcl script
>> (https://www.fossil-scm.org/fossil/file/tools/fossil-stress.tcl) from
>> a linux box against a windows laptop confirms that the "fossil server"
>> command on Windows sometimes latches up.
> 
> Preliminary findings are that this latch-up is the result of an
> adverse interaction with built-in anti-virus software on Win10.  You
> *might* have more success by disabling anti-virus on your server - if
> you dare.  We'll try to figure out a way to fix the problem in fossil,
> in the meantime.

Confirmed that server on macOS, client on Windows (server 2016 and server 2012 
R2) is OK.
Server and client on same Windows box, through localhost is comparable (just 
slightly slower) to server macOS and client Windows.

I'll dig in the source code over the week-end. Generally, there are subtle TCP 
window issues to take into account when configuring sockets on various Windows 
versions, along side with setting up the 'just-right' buffer sizes on those 
sockets to get it right and not have traffic stalling unexpectedly.  Been there 
in our own projects.  I'll experiment with the fossil code here.  Familiarizing 
with winhttp.c for now.

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Richard Hipp
On 12/28/17, Richard Hipp  wrote:
>
> Running multiple copies of the new fossil-stress.tcl script
> (https://www.fossil-scm.org/fossil/file/tools/fossil-stress.tcl) from
> a linux box against a windows laptop confirms that the "fossil server"
> command on Windows sometimes latches up.

Preliminary findings are that this latch-up is the result of an
adverse interaction with built-in anti-virus software on Win10.  You
*might* have more success by disabling anti-virus on your server - if
you dare.  We'll try to figure out a way to fix the problem in fossil,
in the meantime.


-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Richard Hipp
On 12/28/17, Richard Hipp  wrote:
>
> The "fossil server" command *should* be sufficient for this.  However,
> it doesn't get used that much.  Most people run from a proper HTTP
> server of some kind.  Consequently, it is possible for bugs to linger
> in "fossil server" without anybody noticing.

Running multiple copies of the new fossil-stress.tcl script
(https://www.fossil-scm.org/fossil/file/tools/fossil-stress.tcl) from
a linux box against a windows laptop confirms that the "fossil server"
command on Windows sometimes latches up.  I'll try to figure out why.
Or get somebody with more Windows experience to figure out why for me
:-)
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Olivier Mascia
> Le 28 déc. 2017 à 13:51, Richard Hipp  a écrit :
> 
> On 12/28/17, Olivier Mascia  wrote:
>> 
>> Is "fossil server" generally deemed sufficient for a small LAN (lab) of
>> let's say < 10 developers each with their own clone ?
>> Or should a proper HTTP server be used as front end to SCGI mode of fossil?
> 
> The "fossil server" command *should* be sufficient for this.  However,
> it doesn't get used that much.  Most people run from a proper HTTP
> server of some kind.  Consequently, it is possible for bugs to linger
> in "fossil server" without anybody noticing.  One such performance
> bug, that had been in the code for over 10 years, was fixed just
> before Chrismas
> (https://www.fossil-scm.org/fossil/info/05ec15cad53e8176).  That
> particular fix applies to unix systems only, but there might be
> similar problems on the windows side.
> 
> As a test of last weeks' fix, I am currently running a clone of the
> Fossil self-hosting repository using the "fossil server" command in a
> datacenter near Paris on a machine that is approximately equal to a
> Raspberry Pi.  The clone is internet-facing
> (http://www4.fossil-scm.org/) and so far seems to be holding up fine.
> 
> I just took a peek at the code for "fossil server" on windows.
> (Unlike most other commands in fossil, the "fossil server" command
> requires a separate implementation in windows.)  I am reminded that
> windows is not the ideal platform on which to host a web server and
> that compromises had to be made in the implementation.  It *should*
> work. And it does work fine for things like "fossil ui".  But if you
> start hitting it with any kind of load, I can see that it might easily
> bog down.  Probably it will take someone with more windows-foo than me
> to fix that.
> 
> So if you are having problems using "fossil server" on Windows, you
> might do well to set up a Raspberry PI (or the equivalent) in the
> corner of the room and run "fossil server" there instead, using the
> latest "trunk" version of Fossil that contains the Christmas-eve patch
> for the "fossil server" inefficiency.

Thanks a lot Richard for this insider view on the matter.
I'll not get down to Raspberry PI (which I really like by the way) but spawn a 
common linux VM for the task and I'm confident, reading your comments, that it 
will be just fine.

By the way, in between, the clone completed successfully. Here is the display 
at end (project ids and password removed).

Round-trips: 250   Artifacts sent: 0  received: 102700
*** time skew *** server is slow by 106.6 seconds
Clone done, sent: 85932  received: 2249557802  ip: 10.32.1.6
Rebuilding repository meta-data...
  100.0% complete...
Extra delta compression...
Vacuuming the database...

I'll have a close look in the next weeks at the source code of the Windows 
server feature of Fossil.  The warning "*** time skew *** will certainly be an 
interesting starting point.

Hopefully I might be able to bring something in that area.  Our own software is 
actually much like Fossil: single process, multi-usages, with its own HTTPS 
embedded server (using OpenSSL).  (Albeit currently only available on Windows, 
so we have good experience in that area of HTTP serving on Windows using custom 
C/C++ code).

For information, my strange experience today was running this code (on both 
server and cloner side): 

This is fossil version 2.5 [f4a9df4dd0] 2017-12-23 04:21:41 UTC
Compiled on Dec 27 2017 16:08:53 using msc-19.11 (64-bit)

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Richard Hipp
On 12/28/17, Olivier Mascia  wrote:
>
> Is "fossil server" generally deemed sufficient for a small LAN (lab) of
> let's say < 10 developers each with their own clone ?
> Or should a proper HTTP server be used as front end to SCGI mode of fossil?

The "fossil server" command *should* be sufficient for this.  However,
it doesn't get used that much.  Most people run from a proper HTTP
server of some kind.  Consequently, it is possible for bugs to linger
in "fossil server" without anybody noticing.  One such performance
bug, that had been in the code for over 10 years, was fixed just
before Chrismas
(https://www.fossil-scm.org/fossil/info/05ec15cad53e8176).  That
particular fix applies to unix systems only, but there might be
similar problems on the windows side.

As a test of last weeks' fix, I am currently running a clone of the
Fossil self-hosting repository using the "fossil server" command in a
datacenter near Paris on a machine that is approximately equal to a
Raspberry Pi.  The clone is internet-facing
(http://www4.fossil-scm.org/) and so far seems to be holding up fine.

I just took a peek at the code for "fossil server" on windows.
(Unlike most other commands in fossil, the "fossil server" command
requires a separate implementation in windows.)  I am reminded that
windows is not the ideal platform on which to host a web server and
that compromises had to be made in the implementation.  It *should*
work. And it does work fine for things like "fossil ui".  But if you
start hitting it with any kind of load, I can see that it might easily
bog down.  Probably it will take someone with more windows-foo than me
to fix that.

So if you are having problems using "fossil server" on Windows, you
might do well to set up a Raspberry PI (or the equivalent) in the
corner of the room and run "fossil server" there instead, using the
latest "trunk" version of Fossil that contains the Christmas-eve patch
for the "fossil server" inefficiency.
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server on a small private LAN

2017-12-28 Thread Olivier Mascia
> Le 28 déc. 2017 à 12:26, Olivier Mascia  a écrit :
> 
> Dear,
> 
> Is "fossil server" generally deemed sufficient for a small LAN (lab) of let's 
> say < 10 developers each with their own clone ?
> Or should a proper HTTP server be used as front end to SCGI mode of fossil?
> 
> From some quick-n-dirty tests (yeah, on a Windows server, not the best of all 
> ideas but simply convenient right now), it looks like cloning a 2 GB 
> repository through http over 1 Gbps LAN is curiously slow and I wonder why. 
> Not that we'll clone every day of course, but it looks so slow that it 
> questions stability.


To give context to this situation, I'm now 45 minutes later and it still is not 
complete.

fossil clone http://olivier@something:8081/repotest repotest-om.fossil
password for olivier: *
remember password (Y/n)? Y
Round-trips: 138   Artifacts sent: 0  received: 82563
...

The computer running fossil server is doing "nothing", 1 or 2% cpu consumed, 
LAN mostly calm.
The computer pulling the clone does the same.
I'm not seeing significant disk IO on any of them.
The LAN segment they're both on has a background noise of about 1 Mbps with 
short peaks of less than 50 Mbps while this is ongoing.

It really looks as if either the fossil process running the clone OR the fossil 
process running the server is abnormally slow doing its work.
I'll probably retry such a clone locally (over http but both processes on same 
machine, through localhost) to try to get an understanding of what's going on.

I must admit it awfully looks like a pure networking issue, but I tested a file 
transfer minutes before rerunning this clone test and I peaked 940 Mbps on the 
wire easily. A Gremlin, there is. Who's got some water?

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] fossil server on a small private LAN

2017-12-28 Thread Olivier Mascia
Dear,

Is "fossil server" generally deemed sufficient for a small LAN (lab) of let's 
say < 10 developers each with their own clone ?
Or should a proper HTTP server be used as front end to SCGI mode of fossil?

From some quick-n-dirty tests (yeah, on a Windows server, not the best of all 
ideas but simply convenient right now), it looks like cloning a 2 GB repository 
through http over 1 Gbps LAN is curiously slow and I wonder why. Not that we'll 
clone every day of course, but it looks so slow that it questions stability.

I'll spawn a linux VM or re-test from a Mac machine to get new experiences, but 
maybe there are anyway things to pay attention to, which I didn't (yet).

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server gives 403 after upgrade to apache 2.4

2017-02-17 Thread Warren Young
On Feb 17, 2017, at 4:05 AM, Benedikt Ahrens  wrote:
> 
> after upgrade from apache2.2 to apache2.4, my fossil cgi server gives a
> 403 error.

Did you read the upgrade guide?

   https://httpd.apache.org/docs/2.4/upgrading.html

Apache 2.4 changes a bunch of things in the way permissions are handled, which 
probably explains your symptom.

This is not a Fossil problem.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server gives 403 after upgrade to apache 2.4

2017-02-17 Thread Benedikt Ahrens
Addendum: I probably took the original configuration from [1], which
would need an update for apache2.4.

[1] https://www.fossil-scm.org/xfer/wiki?name=Cookbook#CGI


On 02/17/2017 12:05 PM, Benedikt Ahrens wrote:
> Hi,
> 
> after upgrade from apache2.2 to apache2.4, my fossil cgi server gives a
> 403 error. It worked fine with apache2.2.
> The rest of the website works after the upgrade, both over http and https.
> 
> The apache error log states:
> [Fri Feb 17 12:00:41.004779 2017] [authz_core:error] [pid 1681] [client
> 90.105.173.97:55792] AH01630: client denied by server configuration:
> /home/user/cgi-bin/r.cgi
> 
> The VirtualHost config is posted below.
> 
> Any help for solving this particular problem, or for improving the setup
> more generally, would be appreciated.
> 
> Best,
> Benedikt
> 
> 
> 
> 
> ServerAdmin ***
> ServerName ***
> 
> DirectoryIndex index.html index.php
> DocumentRoot /home/user/public_html
> 
> Options +FollowSymLinks -Indexes
> AllowOverride AuthConfig
> Require all granted
> 
> 
> ScriptAlias /cgi-bin/ /home/user/cgi-bin/
> 
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> # Order allow,deny
> # Allow from all
> Require all granted
> 
> 
> #   SSL Engine Switch
> SSLEngine on
> 
> SSLCertificateFile /etc/ssl/private/cert.ssl
> 
> ErrorLog /home/user/apache-logs/error.log
> 
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
> 
> CustomLog /home/user/apache-logs/access.log combined
> 
> 
> 
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
> 
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] fossil server gives 403 after upgrade to apache 2.4

2017-02-17 Thread Benedikt Ahrens
Hi,

after upgrade from apache2.2 to apache2.4, my fossil cgi server gives a
403 error. It worked fine with apache2.2.
The rest of the website works after the upgrade, both over http and https.

The apache error log states:
[Fri Feb 17 12:00:41.004779 2017] [authz_core:error] [pid 1681] [client
90.105.173.97:55792] AH01630: client denied by server configuration:
/home/user/cgi-bin/r.cgi

The VirtualHost config is posted below.

Any help for solving this particular problem, or for improving the setup
more generally, would be appreciated.

Best,
Benedikt




ServerAdmin ***
ServerName ***

DirectoryIndex index.html index.php
DocumentRoot /home/user/public_html

Options +FollowSymLinks -Indexes
AllowOverride AuthConfig
Require all granted


ScriptAlias /cgi-bin/ /home/user/cgi-bin/

AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
# Order allow,deny
# Allow from all
Require all granted


#   SSL Engine Switch
SSLEngine on

SSLCertificateFile /etc/ssl/private/cert.ssl

ErrorLog /home/user/apache-logs/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /home/user/apache-logs/access.log combined



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] 'fossil server' unresponsive with high CPU usage

2016-11-16 Thread Andy Bradford
Thus said Warren Young on Tue, 15 Nov 2016 08:30:56 -0700:

> I'd  suggest that  if  you're  going to  use  ``fossil  server'' on  a
> permanent basis  that you select  a much less troublesome  port number
> and use the -P option to force it.

It can also be stored as a setting:

$ fossil set http-port
http-port(local)  9000

Andy
-- 
TAI64 timestamp: 4000582c78f7


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] 'fossil server' unresponsive with high CPU usage

2016-11-15 Thread Warren Young
On Nov 15, 2016, at 12:09 AM, J. Cameron Cooper  wrote:
> 
> after reinstalling [crtmpserver] today I don't see the issue anymore.

It could have been a firewall issue, then, with the package’s post-install 
script restoring the proper port 8080 firewall rule, which also allows Fossil 
through as a side-benefit.

I’d suggest that if you’re going to use “fossil server” on a permanent basis 
that you select a much less troublesome port number and use the -P option to 
force it.

Here’s my wrapper script for starting Fossil as a server, which deals with that 
and several other common issues:



#!/bin/sh
OLDPID=`pgrep fossil`
if [ -n "$OLDPID" ]
then
echo "Killing old Fossil instance (PID $OLDPID) first..."
kill $OLDPID

typeset -i i=1
while kill -0 $OLDPID > /dev/null 2>&1 && [ $i -lt 30 ]
do
if [ $i -eq 1 ]
then
echo -n "Waiting for it to die..."
else
echo -n .
fi
sleep '0.1s'
i=i+1
done
echo
fi

fossil server -P 3691 --repolist /museum > /dev/null &
echo Fossil server running, PID $!.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] 'fossil server' unresponsive with high CPU usage

2016-11-14 Thread J. Cameron Cooper
>
> On Nov 14, 2016, at 12:32 AM, J. Cameron Cooper  wrote:
> >
> > I've been happily using fossil for quite a few years now, but I recently had
> > an unusual symptom develop on one of my machines. I think it's a bug, but I
> > have no idea how to add a ticket on the main site, so I'll drop it here.
>
> This is the correct place to report such things.  The Fossil project’s ticket
> tracker is not publicly writable to avoid ticket spam.
>
> > I found the command 'fossil server' caused fossil to spin with 100% cpu 
> > usage
> > (for at least hours, so I'm guessing it's indefinite) when it tried to 
> > listen
> > on the default port if that port was already occupied by 'crtmpserver'. (For
> > most occupants of a port fossil prints out a message about the conflict and
> > exits, but for 'crtmpserver' it just sits and spins as described. Perhaps
> > 'crtmpserver' is poorly behaved?)
>
> The OS’s network stack doesn’t consult the program already bound to the TCP
> port in order to figure out what it should do when another program comes along
> and tries to bind to the same port.  All of the logic it uses to decide what 
> to
> do is part of the network stack and related code, such as the firewall and
> security subsystems of the kernel.
>
> Therefore, this problem cannot be specific to crtmpserver, or to Fossil.
>
> > crtmpserver may have just started running on 8080 via an update; dunno why
> > else I suddenly encountered this.
>
> 8080 is a very popular default port number to use for anything that speaks
> HTTP, as both Fossil and crtmpserver do.  (RTMP can be encapsulated within
> HTTP.)
>
> > OS is Linux Mint 17.3. Fossil version is 1.35, though the same occurs on 
> > 1.27
> > (the distro version). The 1.35 version prints "Listening for HTTP requests 
> > on
> > TCP port 8080"; the 1.27 prints nothing. 'fossil ui' behaves similarly.
>
> I’m confused.  Are you saying that it says "Listening for HTTP requests on TCP
> port 8080” and then pegs the CPU, and doesn’t respond?  And that it does this
> even though crtmpserver is already bound to port 8080?
>
>
Yes.


> If Fossil isn’t running, and you try to connect to http://localhost:8080 from 
> a
> browser on the Fossil/crtmpserver machine, what do you get in the browser when
> Fossil isn’t running?  Does that change after you start Fossil?
>
>
Browser reports no response in either case; if I open up a telnet session
directly I see the same thing: no response to anything.

I can’t replicate your problem here on a CentOS 7 box.  I’ve started a random
> program here on port 8080, then started Fossil, and it correctly failed to 
> bind
> to port 8080 and moved on to 8081.
>
>
I also saw this behavior; running two Fossil servers on 8081, the second
reports the conflict and shuts down.


> What do you get from strace if you run Fossil underneath it while crtmpserver
> is running, causing Fossil to hit 100% CPU?
>
>
Hm. I uninstalled crtmpserver yesterday to deal with the problem and after
reinstalling it today I don't see the issue anymore. Fossil correctly
detects the used socket like normal. And crtmpserver responds on 8080,
appropriately as a web server, which it didn't before. (I didn't know what
it was using the port for, since I don't actually use it.) It must've
gotten into some odd state. So, can't provide any further info. Sorry.

Thanks for you time. Guess we'll just call it "transient".

On Mon, Nov 14, 2016 at 1:32 AM, J. Cameron Cooper 
wrote:

> I've been happily using fossil for quite a few years now, but I recently
> had an unusual symptom develop on one of my machines. I think it's a bug,
> but I have no idea how to add a ticket on the main site, so I'll drop it
> here.
>
> I found the command 'fossil server' caused fossil to spin with 100% cpu
> usage (for at least hours, so I'm guessing it's indefinite) when it tried
> to listen on the default port if that port was already occupied by
> 'crtmpserver'. (For most occupants of a port fossil prints out a message
> about the conflict and exits, but for 'crtmpserver' it just sits and spins
> as described. Perhaps 'crtmpserver' is poorly behaved?)
>
> It's not a popular package, but perhaps the condition may be exercised by
> other daemons as well, so I thought it worth reporting. crtmpserver may
> have just started running on 8080 via an update; dunno why else I suddenly
> encountered this.
>
> OS is Linux Mint 17.3. Fossil version is 1.35, though the same occurs on
> 1.27 (the distro version). The 1.35 version prints "Listening for HTTP
> requests on TCP port 8080"; the 1.27 prints nothing. 'fossil ui' behaves
> similarly.
>
> --
> J Cameron Cooper
>



-- 
J Cameron Cooper
jccoo...@gmail.com
jccoo...@cooperdigital.com 
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] 'fossil server' unresponsive with high CPU usage

2016-11-14 Thread Warren Young
On Nov 14, 2016, at 12:32 AM, J. Cameron Cooper  wrote:
> 
> I've been happily using fossil for quite a few years now, but I recently had 
> an unusual symptom develop on one of my machines. I think it's a bug, but I 
> have no idea how to add a ticket on the main site, so I'll drop it here.

This is the correct place to report such things.  The Fossil project’s ticket 
tracker is not publicly writable to avoid ticket spam.

> I found the command 'fossil server' caused fossil to spin with 100% cpu usage 
> (for at least hours, so I'm guessing it's indefinite) when it tried to listen 
> on the default port if that port was already occupied by 'crtmpserver'. (For 
> most occupants of a port fossil prints out a message about the conflict and 
> exits, but for 'crtmpserver' it just sits and spins as described. Perhaps 
> 'crtmpserver' is poorly behaved?)

The OS’s network stack doesn’t consult the program already bound to the TCP 
port in order to figure out what it should do when another program comes along 
and tries to bind to the same port.  All of the logic it uses to decide what to 
do is part of the network stack and related code, such as the firewall and 
security subsystems of the kernel.

Therefore, this problem cannot be specific to crtmpserver, or to Fossil.

> crtmpserver may have just started running on 8080 via an update; dunno why 
> else I suddenly encountered this.

8080 is a very popular default port number to use for anything that speaks 
HTTP, as both Fossil and crtmpserver do.  (RTMP can be encapsulated within 
HTTP.)

> OS is Linux Mint 17.3. Fossil version is 1.35, though the same occurs on 1.27 
> (the distro version). The 1.35 version prints "Listening for HTTP requests on 
> TCP port 8080"; the 1.27 prints nothing. 'fossil ui' behaves similarly.

I’m confused.  Are you saying that it says "Listening for HTTP requests on TCP 
port 8080” and then pegs the CPU, and doesn’t respond?  And that it does this 
even though crtmpserver is already bound to port 8080?

If Fossil isn’t running, and you try to connect to http://localhost:8080 from a 
browser on the Fossil/crtmpserver machine, what do you get in the browser when 
Fossil isn’t running?  Does that change after you start Fossil?

I can’t replicate your problem here on a CentOS 7 box.  I’ve started a random 
program here on port 8080, then started Fossil, and it correctly failed to bind 
to port 8080 and moved on to 8081.

What do you get from strace if you run Fossil underneath it while crtmpserver 
is running, causing Fossil to hit 100% CPU?
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] 'fossil server' unresponsive with high CPU usage

2016-11-13 Thread J. Cameron Cooper
I've been happily using fossil for quite a few years now, but I recently
had an unusual symptom develop on one of my machines. I think it's a bug,
but I have no idea how to add a ticket on the main site, so I'll drop it
here.

I found the command 'fossil server' caused fossil to spin with 100% cpu
usage (for at least hours, so I'm guessing it's indefinite) when it tried
to listen on the default port if that port was already occupied by
'crtmpserver'. (For most occupants of a port fossil prints out a message
about the conflict and exits, but for 'crtmpserver' it just sits and spins
as described. Perhaps 'crtmpserver' is poorly behaved?)

It's not a popular package, but perhaps the condition may be exercised by
other daemons as well, so I thought it worth reporting. crtmpserver may
have just started running on 8080 via an update; dunno why else I suddenly
encountered this.

OS is Linux Mint 17.3. Fossil version is 1.35, though the same occurs on
1.27 (the distro version). The 1.35 version prints "Listening for HTTP
requests on TCP port 8080"; the 1.27 prints nothing. 'fossil ui' behaves
similarly.

-- 
J Cameron Cooper
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server not reliably serving css and js

2016-09-28 Thread Maninder Singh Suri
A little more info:
It happens way too frequently on Chrome and derived browsers. On Firefox, I
see it much less often.

I have a ~4MB repo which shows the issue (no code, only tickets). So this
behavior is independent of repo size.

I am serving from a windows10 machine if that matters.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server not reliably serving css and js

2016-09-26 Thread Richard Hipp
On 9/26/16, Warren Young  wrote:
>
> I don’t recall seeing inline images in any of the SQLite embedded docs.

The Fossil homepage (https://www.fossil-scm.org/) is an embedded
document and it has the lizard embedded image.
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server not reliably serving css and js

2016-09-26 Thread Warren Young
On Sep 26, 2016, at 12:53 PM, Richard Hipp  wrote:
> 
> On 9/26/16, Warren Young  wrote:
>> On Sep 25, 2016, at 11:27 PM, Maninder Singh Suri 
>> wrote:
>>> 
>>> Now when I open any page, these js and css files being served are a hit
>>> and miss.
>> 
>> I think I’ve seen the same thing under different circumstances.  A doc URL
>> in a wiki document pointing at an SVG graphic I want displayed inline in the
>> wiki article doesn’t always load on the first try.
> 
> I need a way to reproduce the problem in order to fix it.

I’ve just tried to create a simple Fossil repository that shows this, but have 
failed to replicate it so far.  Yet, I also just verified that it still happens 
with a much larger, much older repository here.

Unfortunately, the problem repository is private, and my only large public repo 
has no wiki documents.

For what it’s worth, here’s what I tried to replicate it:

mkdir doc-404-test
cd doc-404-test/
f new ../doc-404-test.fossil
f open ../doc-404-test.fossil 
mv ~/Desktop/blacklab.jpg .
f add blacklab.jpg 
f ci -m 'added jpeg'
f serve

Then I added a Markdown-flavored wiki document, with this content:

![black labrador](/doc/trunk/blacklab.jpg)

I’ve also tried:

1. Moving the repo to my main internal Fossil server and accessing it through 
it. (Yes, I prepended /doc-404-test to the URL at that time.)

2. Serving the same repo from a Linux box I normally don’t serve from.  (That 
makes 3 OSes tested: CentOS 7, OS X 10.11, and FreeBSD 10.2.)

3. Added a bunch of textual content, both above and below the image.

4. Same thing, only with an SVG.

5. Both JPEG and SVG in same document.

None of these attempts caused the problem to reoccur.  My guess is that there 
is some problem that only shows up when the repo gets large enough.  Since it’s 
intermittent, that makes me think “race condition,” but that seems unlikely for 
an ACID-compliant DBMS.

Further complicating the issue is the browser cache, of course.  As a web 
developer, I dump my caches fairly often, but normal people aren’t going to do 
that, so they’ll be much less sensitive to the issue.

I don’t recall seeing inline images in any of the SQLite embedded docs.  That 
may be a way to try to replicate it.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server not reliably serving css and js

2016-09-26 Thread Richard Hipp
On 9/26/16, Warren Young  wrote:
> On Sep 25, 2016, at 11:27 PM, Maninder Singh Suri 
> wrote:
>>
>>
>> Now when I open any page, these js and css files being served are a hit
>> and miss.
>> Sometimes, these laod up fine, but other times, the js or the css fails to
>> load.
>
> I think I’ve seen the same thing under different circumstances.  A doc URL
> in a wiki document pointing at an SVG graphic I want displayed inline in the
> wiki article doesn’t always load on the first try.
>
> I haven’t bothered reporting it because I can just reload to fix it, but for
> files critical to the skin, I can see that that would be more burdensome in
> your case.

I need a way to reproduce the problem in order to fix it.
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server not reliably serving css and js

2016-09-26 Thread Warren Young
On Sep 25, 2016, at 11:27 PM, Maninder Singh Suri  wrote:
> 
> 
> Now when I open any page, these js and css files being served are a hit and 
> miss.
> Sometimes, these laod up fine, but other times, the js or the css fails to 
> load.

I think I’ve seen the same thing under different circumstances.  A doc URL in a 
wiki document pointing at an SVG graphic I want displayed inline in the wiki 
article doesn’t always load on the first try.

I haven’t bothered reporting it because I can just reload to fix it, but for 
files critical to the skin, I can see that that would be more burdensome in 
your case.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] fossil server not reliably serving css and js

2016-09-25 Thread Maninder Singh Suri
I have started to play around with the Fossil ticketing system.
For improving the ticketing system, I have added jquery, jqueryui and
tinymce editor.
>From jquery and jqueryui, I am trying to use the datetime picker.
And using the tiny mce editor to replace the text area fields.

I checked-in the css and js files for these so I could serve those from the
repo itself, instead of usign a CDN. I made changes to the header and
footer of the skin, to load up these js and css file.

Now when I open any page, these js and css files being served are a hit and
miss.
Sometimes, these laod up fine, but other times, the js or the css fails to
load.

I have checked in the browser console, and this is what I see.
This happens inconsistently and happens with different files sometimes.

I see ERR_CONNECTION_RESET in the console log:

GET
http://localhost:8081/doc/tip/Fossil%20Helpers/jquery-ui-1.12.0.custom/jquery-ui.css
net::ERR_CONNECTION_RESET

It looks like fossil is not able to serve the file? any help would be
appreciated.

tktnew 200 document Other 2.6 KB 408 ms
style.css?default 200 stylesheet tktnew:10  6.6
KB 773 ms
jquery-3.1.0.min.js 200 script tktnew:12  29.6
KB 1.30 s
jquery-ui.css (failed) tktnew:14  0 B 1.44 s
jquery-ui.min.js 200 script tktnew:15 
17.0 KB 1.43
s
jquery-ui-timepicker-addon.css 200 stylesheet tktnew:17
 781 B 1.28 s
jquery-ui-timepicker-addon.js 200 script tktnew:18
 18.8 KB 1.40 s
tinymce.min.js 200 script tktnew:20  126 KB 1.49
s
[image: Inline image 1]
logo 200 png tktnew:27  4.9 KB 684 ms
theme.min.js 200 script tinymce.min.js:4 4.0 KB 282 ms
[image: Inline image 2]
data:image/png;base… 200 png onloadwff.js:1250 (from cache) 0 ms
[image: Inline image 3]
data:image/png;base… 200 png onloadwff.js:1155 (from cache) 0 ms
skin.min.css 200 stylesheet tinymce.min.js:3 7.1 KB 460 ms
content.min.css 200 stylesheet tinymce.min.js:11 1.4 KB 1.01 s
tinymce.woff 200 font tktnew:1  17.0 KB 707 ms
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server

2015-11-02 Thread Josef Frank

On 02.11.2015 09:29:29 Jan Danielsson wrote:

On 01/11/15 13:30, Damien Sykes-Pendleton wrote:

I’m running Windows. I’m not personally running anything on port 80, though I 
get a blank web page (as opposed to a 404 or problem loading error) when I 
visit localhost.


I forget the name of the tool, but in there's a nifty tool for
Windows which can list all the ports and which process owns them.  I
think the tool is part of the Sysinternals Suite (a quick glance makes
me think it may be "PortMon", but I'm not sure).  If you can't figure it
out any other way, you could use that to find out who is hogging port 80.


Actually the mentioned program is part of Windows itself, call it with 
the "-b" option:


netstat -b


--
jf





___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server

2015-11-01 Thread Damien Sykes-Pendleton

Hi all,
Thanks to all of you who have responded. I have managed to find the program 
that was hogging the port and therefore got Fossil up and running again.

Thanks.
Damien.


-Original Message- 
From: Thomas Schnurrenberger

Sent: Sunday, November 01, 2015 12:44 PM
To: fossil-users@lists.fossil-scm.org
Subject: Re: [fossil-users] Fossil server

On 01.11.2015 13:06, Damien Sykes-Pendleton wrote:
What reasons could Fossil be unable to listen on a certain port and is 
there anything I’m missing that I should be doing to allow it access?




Did you check the settings of the Windows Firewall?

--
tsbg

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users 


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server

2015-11-01 Thread Stephan Beal
On Sun, Nov 1, 2015 at 1:06 PM, Damien Sykes-Pendleton <
dam...@dcpendleton.plus.com> wrote:

> “Unable to open listening socket on ports 80”
> My last machine ran the server on port 80 without issue. Port 80 is the
> port that I have forwarded on my router, I tried with the default port and
> it attempted to listen without complaint, despite the fact that port 8080
> isn’t forwarded.
> What reasons could Fossil be unable to listen on a certain port and is
> there anything I’m missing that I should be doing to allow it access?
>

Some other service is running on port 80. Are you running Apache (or
similar)?

Alternately... on Unix, ports under 1024 can only be opened by the root
user, not a normal user account.

You didn't mention which OS you're using.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server

2015-11-01 Thread Thomas Schnurrenberger
On 01.11.2015 13:06, Damien Sykes-Pendleton wrote:
> What reasons could Fossil be unable to listen on a certain port and is there 
> anything I’m missing that I should be doing to allow it access?
> 

Did you check the settings of the Windows Firewall?

-- 
tsbg

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Fossil server

2015-11-01 Thread Damien Sykes-Pendleton
Hi,
I have just got myself a new computer and am trying to restart my Fossil 
server, but for some reason it comes up with the message:
“Unable to open listening socket on ports 80”
My last machine ran the server on port 80 without issue. Port 80 is the port 
that I have forwarded on my router, I tried with the default port and it 
attempted to listen without complaint, despite the fact that port 8080 isn’t 
forwarded.
What reasons could Fossil be unable to listen on a certain port and is there 
anything I’m missing that I should be doing to allow it access?
Thanks.
Damien.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server

2015-11-01 Thread Jan Danielsson
On 01/11/15 13:30, Damien Sykes-Pendleton wrote:
> I’m running Windows. I’m not personally running anything on port 80, though I 
> get a blank web page (as opposed to a 404 or problem loading error) when I 
> visit localhost.

   I forget the name of the tool, but in there's a nifty tool for
Windows which can list all the ports and which process owns them.  I
think the tool is part of the Sysinternals Suite (a quick glance makes
me think it may be "PortMon", but I'm not sure).  If you can't figure it
out any other way, you could use that to find out who is hogging port 80.

-- 
Kind Regards,
Jan
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server

2015-11-01 Thread Damien Sykes-Pendleton
Hi Stephan,
I’m running Windows. I’m not personally running anything on port 80, though I 
get a blank web page (as opposed to a 404 or problem loading error) when I 
visit localhost.
Thanks.
Damien.

From: Stephan Beal 
Sent: Sunday, November 01, 2015 12:10 PM
To: Fossil SCM user's discussion 
Subject: Re: [fossil-users] Fossil server

On Sun, Nov 1, 2015 at 1:06 PM, Damien Sykes-Pendleton 
<dam...@dcpendleton.plus.com> wrote:

  “Unable to open listening socket on ports 80”

  My last machine ran the server on port 80 without issue. Port 80 is the port 
that I have forwarded on my router, I tried with the default port and it 
attempted to listen without complaint, despite the fact that port 8080 isn’t 
forwarded.
  What reasons could Fossil be unable to listen on a certain port and is there 
anything I’m missing that I should be doing to allow it access?

Some other service is running on port 80. Are you running Apache (or similar)?

Alternately... on Unix, ports under 1024 can only be opened by the root user, 
not a normal user account.

You didn't mention which OS you're using.


-- 

- stephan beal
http://wanderinghorse.net/home/stephan/ 
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those 
who insist on a perfect world, freedom will have to do." -- Bigby Wolf



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server issue

2015-04-23 Thread Abilio Marques
I first understood that the restrictions were on the URL only, but yeah,
it's imaginable that they will be applied to the path too.

On Thu, Apr 23, 2015 at 6:34 AM, Richard Hipp d...@sqlite.org wrote:

 On 4/22/15, Abilio Marques abili...@gmail.com wrote:
  Hi,
 
  I keep the main storage for my repos in a directory called
 ~/.fossilrepos .
  I've been using for a few years now:
 
  fossil server ~/.fossilrepos (with nohup)
 
  And it works perfectly. Yet, today I was trying to use the --files
 option.
  I first made an experiment with something like:
 
  fossil server --files '*.txt' ~/tmp
 
  And it correctly served to me a file called hello.txt. Yet, when I try to
  browse to a txt file inside the real directory, using:
 
  fossil server --files '*.txt' ~/.fossilrepos
 
  I get a not found. So I made a quick test and renamed the directory to:
  fossilrepos (without the dot). Then restarted, and it serves the *.txt
  files just fine. It seems it doesn't like the dot in the repo directory.
 
  Is that normal behaviour?
 

 Yes.  There are restrictions on the file and directories names used by
 the web-server.  These restrictions are designed to enhance security,
 and prevent attacks that consist of sending unusual URIs into the
 web-server with the aim of unauthorized content.

 https://www.fossil-scm.org/fossil/artifact/41d452b2fa?ln=1508-1526
 --
 D. Richard Hipp
 d...@sqlite.org
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server issue

2015-04-23 Thread Richard Hipp
On 4/22/15, Abilio Marques abili...@gmail.com wrote:
 Hi,

 I keep the main storage for my repos in a directory called ~/.fossilrepos .
 I've been using for a few years now:

 fossil server ~/.fossilrepos (with nohup)

 And it works perfectly. Yet, today I was trying to use the --files option.
 I first made an experiment with something like:

 fossil server --files '*.txt' ~/tmp

 And it correctly served to me a file called hello.txt. Yet, when I try to
 browse to a txt file inside the real directory, using:

 fossil server --files '*.txt' ~/.fossilrepos

 I get a not found. So I made a quick test and renamed the directory to:
 fossilrepos (without the dot). Then restarted, and it serves the *.txt
 files just fine. It seems it doesn't like the dot in the repo directory.

 Is that normal behaviour?


Yes.  There are restrictions on the file and directories names used by
the web-server.  These restrictions are designed to enhance security,
and prevent attacks that consist of sending unusual URIs into the
web-server with the aim of unauthorized content.

https://www.fossil-scm.org/fossil/artifact/41d452b2fa?ln=1508-1526
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Fossil server issue

2015-04-22 Thread Abilio Marques
Hi,

I keep the main storage for my repos in a directory called ~/.fossilrepos .
I've been using for a few years now:

fossil server ~/.fossilrepos (with nohup)

And it works perfectly. Yet, today I was trying to use the --files option.
I first made an experiment with something like:

fossil server --files '*.txt' ~/tmp

And it correctly served to me a file called hello.txt. Yet, when I try to
browse to a txt file inside the real directory, using:

fossil server --files '*.txt' ~/.fossilrepos

I get a not found. So I made a quick test and renamed the directory to:
fossilrepos (without the dot). Then restarted, and it serves the *.txt
files just fine. It seems it doesn't like the dot in the repo directory.

Is that normal behaviour?
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server for timeline will return empty result for some parameters max

2015-03-19 Thread die.drachen
I wasn't sure if my attachment made it through the mailing list. Is there an 
issue/report/task created for this which I can continue following instead of 
through the mailing list? I couldn't figure out how to create an issue on the 
fossil-scm site.

 On Mar 18, 2015, at 10:30 AM, die.drachen die.drac...@gmail.com wrote:
 
 I attached the output (using lldb instead of gdb).
 
 fossil-debug.txt
 On Mar 18, 2015, at 8:12 AM, Richard Hipp d...@sqlite.org wrote:
 
 On 3/18/15, die.drachen die.drac...@gmail.com wrote:
 Unfortunately I'm unable to distribute the repo, which is also quite large
 (~730mb .fossil file, 93k commits). Are there additional measures I can
 take to get diagnostic information?
 
 
 Compile your own Fossil from trunk sources, using options -O0 -g.
 Then run gdb fossil and within gdb type:  run test-http
 REPOFILENAME (filling in the appropriate filename, of course).  There
 will be no prompt, but Fossil is waiting for input at this point.
 Type:
 
   GET /timeline?n=421y=all
 
 with no leading spaces and the press Enter twice.  When you hit the
 error, type bt and send me the output.
 -- 
 D. Richard Hipp
 d...@sqlite.org
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
 

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server for timeline will return empty result for some parameters max

2015-03-18 Thread Richard Hipp
On 3/18/15, die.drachen die.drac...@gmail.com wrote:
 Unfortunately I'm unable to distribute the repo, which is also quite large
 (~730mb .fossil file, 93k commits). Are there additional measures I can
 take to get diagnostic information?


Compile your own Fossil from trunk sources, using options -O0 -g.
Then run gdb fossil and within gdb type:  run test-http
REPOFILENAME (filling in the appropriate filename, of course).  There
will be no prompt, but Fossil is waiting for input at this point.
Type:

GET /timeline?n=421y=all

with no leading spaces and the press Enter twice.  When you hit the
error, type bt and send me the output.
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server for timeline will return empty result for some parameters max

2015-03-18 Thread die.drachen
I attached the output (using lldb instead of gdb).

$ lldb fossil
(lldb) target create fossil
Current executable set to 'fossil' (x86_64).
(lldb) run test-http mimjava.fossil
Process 87976 launched: '/.../fossil' (x86_64)
GET /timeline?n=421y=all

Process 87976 stopped
* thread #1: tid = 0x38540d, 0x00010004a092 
fossil`graph_finish(p=0x000100700f70, omitDescenders=0) + 2850 at 
graph.c:537, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS 
(code=EXC_I386_GPFLT)
frame #0: 0x00010004a092 fossil`graph_finish(p=0x000100700f70, 
omitDescenders=0) + 2850 at graph.c:537
   534** Insert merge rails and merge arrows
   535*/
   536for(pRow=p-pFirst; pRow; pRow=pRow-pNext){
- 537  for(i=1; ipRow-nParent; i++){
   538int parentRid = pRow-aParent[i];
   539pDesc = hashFind(p, parentRid);
   540if( pDesc==0 ){
(lldb) bt
* thread #1: tid = 0x38540d, 0x00010004a092 
fossil`graph_finish(p=0x000100700f70, omitDescenders=0) + 2850 at 
graph.c:537, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS 
(code=EXC_I386_GPFLT)
  * frame #0: 0x00010004a092 fossil`graph_finish(p=0x000100700f70, 
omitDescenders=0) + 2850 at graph.c:537
frame #1: 0x0001000afe26 
fossil`www_print_timeline(pQuery=0x7fff5fbff8a0, tmFlags=12, 
zThisUser=0x, zThisTag=0x, 
selectedRid=-999, xExtra=0x) + 6374 at timeline.c:582
frame #2: 0x0001000b28bc fossil`page_timeline + 8716 at timeline.c:1670
frame #3: 0x0001000664f7 
fossil`process_one_web_page(zNotFound=0x, 
pFileGlob=0x, allowRepoList=0) + 2823 at main.c:1768
frame #4: 0x000100067306 fossil`cmd_test_http + 278 at main.c:2212
frame #5: 0x000100062eb0 fossil`main(argc=3, argv=0x7fff5fbffab8) + 
2384 at main.c:788
frame #6: 0x7fff8f05a5fd libdyld.dylib`start + 1
frame #7: 0x7fff8f05a5fd libdyld.dylib`start + 1
(lldb) 

 On Mar 18, 2015, at 8:12 AM, Richard Hipp d...@sqlite.org wrote:
 
 On 3/18/15, die.drachen die.drac...@gmail.com wrote:
 Unfortunately I'm unable to distribute the repo, which is also quite large
 (~730mb .fossil file, 93k commits). Are there additional measures I can
 take to get diagnostic information?
 
 
 Compile your own Fossil from trunk sources, using options -O0 -g.
 Then run gdb fossil and within gdb type:  run test-http
 REPOFILENAME (filling in the appropriate filename, of course).  There
 will be no prompt, but Fossil is waiting for input at this point.
 Type:
 
GET /timeline?n=421y=all
 
 with no leading spaces and the press Enter twice.  When you hit the
 error, type bt and send me the output.
 -- 
 D. Richard Hipp
 d...@sqlite.org
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server for timeline will return empty result for some parameters max

2015-03-17 Thread die . drachen
Unfortunately I'm unable to distribute the repo, which is also quite large 
(~730mb .fossil file, 93k commits). Are there additional measures I can take 
to get diagnostic information?

Christopher


 On Mar 17, 2015, at 7:09 PM, Richard Hipp d...@sqlite.org wrote:
 
 On 3/17/15, die.drachen die.drac...@gmail.com wrote:
 With fossil 1.31 [2e7c40dbdd] on OSX I ran locally:
 $ fossil server
 
 Then on the timeline page for the Max field, when I enter values between
 421-449, the server doesn't respond. Using curl:
 
 $ curl http://localhost:8080/timeline?n=421y=allv=0
 http://localhost:8080/timeline?n=421y=allv=0
 curl: (52) Empty reply from server
 
 Probably the code to compute the graph is segfaulting.  Can you send
 me the repo that gives this error?
 
 
 Using values n421, n449 appear to work without problem.
 
 One thing I notice is that on the webpage for values 421 the graph appears,
 but values 449 there is no graph (presumably some threshold of complexity
 in the branches).
 
 I couldn't reproduce any problems when using the fossil timeline command,
 with parameters (not sure how y, v would map to parameters).
 
 Additionally, I couldn't find any documentation about where logs would go
 when running fossil server. I couldn't find logs anywhere to see if there
 was an issue. I saw a few other posts about timeline being problematic, but
 nothing that seemed to describe this same problem.
 
 Christopher
 
 
 -- 
 D. Richard Hipp
 d...@sqlite.org
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server for timeline will return empty result for some parameters max

2015-03-17 Thread Andy Bradford
Thus said die.drachen die.drac...@gmail.com on Wed, 18 Mar 2015 00:58:41 
-0400:

 Unfortunately I'm unable  to distribute the repo, which  is also quite
 large  (~730mb  .fossil  file,  93k commits).  Are  there  additional
 measures I can take to get diagnostic information?

You could  ensure that core  files are allowed  (check ulimit -c  in the
environment where you  start Fossil server). Then watch for  a core file
and use gdb to provide the output of backtrace:

$ gdb fossil fossil.core
 bt
...

Thanks,

Andy
-- 
TAI64 timestamp: 4000550907c5


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] fossil server for timeline will return empty result for some parameters max

2015-03-17 Thread die.drachen
With fossil 1.31 [2e7c40dbdd] on OSX I ran locally:
$ fossil server

Then on the timeline page for the Max field, when I enter values between 
421-449, the server doesn't respond. Using curl:

$ curl http://localhost:8080/timeline?n=421y=allv=0 
http://localhost:8080/timeline?n=421y=allv=0
curl: (52) Empty reply from server

Using values n421, n449 appear to work without problem.

One thing I notice is that on the webpage for values 421 the graph appears, 
but values 449 there is no graph (presumably some threshold of complexity in 
the branches).

I couldn't reproduce any problems when using the fossil timeline command, with 
parameters (not sure how y, v would map to parameters).

Additionally, I couldn't find any documentation about where logs would go when 
running fossil server. I couldn't find logs anywhere to see if there was an 
issue. I saw a few other posts about timeline being problematic, but nothing 
that seemed to describe this same problem.

Christopher___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server for timeline will return empty result for some parameters max

2015-03-17 Thread Richard Hipp
On 3/17/15, die.drachen die.drac...@gmail.com wrote:
 With fossil 1.31 [2e7c40dbdd] on OSX I ran locally:
 $ fossil server

 Then on the timeline page for the Max field, when I enter values between
 421-449, the server doesn't respond. Using curl:

 $ curl http://localhost:8080/timeline?n=421y=allv=0
 http://localhost:8080/timeline?n=421y=allv=0
 curl: (52) Empty reply from server

Probably the code to compute the graph is segfaulting.  Can you send
me the repo that gives this error?


 Using values n421, n449 appear to work without problem.

 One thing I notice is that on the webpage for values 421 the graph appears,
 but values 449 there is no graph (presumably some threshold of complexity
 in the branches).

 I couldn't reproduce any problems when using the fossil timeline command,
 with parameters (not sure how y, v would map to parameters).

 Additionally, I couldn't find any documentation about where logs would go
 when running fossil server. I couldn't find logs anywhere to see if there
 was an issue. I saw a few other posts about timeline being problematic, but
 nothing that seemed to describe this same problem.

 Christopher


-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server responds Not Found [1.28]

2014-05-23 Thread pablo
Excellent guess!

On the other machine I did this:

[--CODE]
root@lamp ~# uname -a
Linux lamp 2.6.32-5-xen-amd64 #1 SMP Mon Feb 25 02:51:39 UTC 2013 x86_64
GNU/Linux

root@lamp ~# cat /etc/issue
Debian GNU/Linux 6.0 \n \l

root@lamp ~# cat /etc/debian_version
6.0.7

root@lamp ~# fossil version
This is fossil version 1.28 [3d49f04587] 2014-01-27 17:33:44 UTC

root@lamp ~# fossil new repo.fsl
project-id: c4065c768ae6a23fbcf2723a91e9ea61c77339df
server-id:  5ba75ad33124d622a800c2e61e378f5b8441141a
admin-user: root (initial password is f5ee61)

root@lamp ~# fossil server repo.fsl
[--]

And browsing to there I got:

Not Found

then I realize that I'm using fossil, but thru apache as cgi, so the user
is www-data

so

[--CODE]
root@lamp ~# fossil new /tmp/repo.fsl
project-id: cdba2ccc3dfd16201e6ac6a00c4c1092ce350b80
server-id:  db34178c6e85a35f38f5eb8a7ba3cda8a71266db
admin-user: root (initial password is 051c04)

root@lamp ~# chown www-data:www-data /tmp/repo.fsl

root@lamp ~# su -c fossil server /tmp/repo.fsl www-data
[--]

And browsing works flawlessly

In the end, I will have to wait for 1.29 because I want to version the /etc
dir of the server, to keep changes documented, and only root have full
acces to it :(

Thanks for the help!


On Thu, May 22, 2014 at 9:46 PM, Joe Prostko joe.pros...@gmail.com wrote:

 On Fri, May 23, 2014 at 1:00 AM, pablo pa...@thy.oib.com wrote:
  Hi to all,
 
  What I have to do for FOSSIL SERVER to work on my server?
 
  I have installed a linux server on a VmWare Workstation and using the
 1.28
  version of fossil.
  When I try to browse the repository i get a message of Not Found no
 matter
  what path I try to access (/index , /timeline)

 My guess is it is because you are running Fossil as root.  This was
 fixed somewhat recently, here:


 http://fossil-scm.org/index.html/info/5e47d555e4770445328a34f8a46f6487b75192f6

 Are you running as root on your other TKL installation?  If you can
 build from source, maybe try a trunk build.  If not, I think you'll
 have to wait for 1.29 to come out, which I suspect will be really
 soon.

 - joe
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server responds Not Found [1.28]

2014-05-23 Thread Stephan Beal
On Fri, May 23, 2014 at 8:53 PM, pablo pa...@thy.oib.com wrote:

 In the end, I will have to wait for 1.29 because I want to version the
 /etc dir of the server, to keep changes documented, and only root have full
 acces to it :(


Be aware that you WILL have to add scripts around that to make it work for
you because fossil does not (and will not) have support for all the various
permissions, nor for changing owners/groups of files. Some files under /etc
REQUIRE very specific permissions or they won't work. e.g. /etc/shadow is
required to NOT be world-readable, and files under /etc/ssh may not work if
they're world-writable.

IMO, fossil is most definitely not the right tool for versioning /etc (or
any system-level files, for that matter). YMMV, of course, and you might
want to search through the list archives for various discussions on this
topic (one or two of them quite recently - the past few months).

PS: no need to wait for 1.29 - build it from the trunk (since you're on
Linux, that's trivial to do). FWIW, myself and the other devs basically
always use whatever's at the tip of whatever branch(es) we're playing with.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do. -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] fossil server responds Not Found [1.28]

2014-05-22 Thread pablo
Hi to all,

What I have to do for FOSSIL SERVER to work on my server?

I have installed a linux server on a VmWare Workstation and using the 1.28
version of fossil.
When I try to browse the repository i get a message of Not Found no
matter what path I try to access (/index , /timeline)

The linux distro is a debian based one, is TurnKey Linux (
http://www.turnkeylinux.org/lampstack).

[-CODE]
root@lamp ~# uname -a
Linux lamp 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux

root@lamp ~# cat /etc/issue
Debian GNU/Linux 7 \n \l

root@lamp ~# cat /etc/debian_version
7.5
[-]

The odd thing is that a previous version of fossil works almost good, here
is the test I have performed on the machine using version 1.28 (foss128)
and 1.27 (foss127)

[-CODE]
root@lamp ~# ./foss127 new repo.fsl
project-id: fa993116862f7a5d401b3f3649ef414d020e1fa5
server-id: 2c90e6a8fa9bbd06a0afe46be74c1a6ce2205859
admin-user: root (initial password is 225f67)

root@lamp ~# ./foss127 server repo.fsl

 Browsing to http://127.0.0.1:8080/index 

I can see the index page, but with a red message:
SQLITE_WARNING: file renamed while open: /root/repo.fsl

-

Now, lets try serving with the latest version...

[-CODE]
root@lamp ~# ./foss128 server repo.fsl

 Browsing to http://127.0.0.1:8080/index 

Not Found

-

Now, let's try creating the repository with the latest version

[-CODE]
root@lamp ~# ./foss128 new other.fsl
project-id: ca29fe005fe55bb5e8bd2634a104dd199276b72f
server-id: 1fa9e233a3f276b9e4fa64ab5f19d66db1fe1c34
admin-user: root (initial password is 4ca8eb)

root@lamp ~# ./foss128 server other.fsl

 Browsing to http://127.0.0.1:8080/index 

Not Found

-

And what happens when we try to serve with the previous version?

[-CODE]
root@lamp ~# ./foss127 server other.fsl

 Browsing to http://127.0.0.1:8080/index 

I can see again the index page, but again, with the red message
SQLITE_WARNING: file renamed while open: /root/other.fsl

-


Could it be a permissions problem ?

[-CODE]
root@lamp ~# ls -l *.fsl
-rw-r--r-- 1 root root 58368 May 22 23:39 other.fsl
-rw-r--r-- 1 root root 58368 May 22 23:34 repo.fsl

root@lamp ~# ls -l /
drwx-- 9 root root 4096 May 22 23:39 root
drwxr-xr-x 13 root root 4096 Oct 15 2013 var
drwxrwxrwt 6 root root 4096 May 22 23:39 tmp
[-]

I tried the same exercise putting the repo files onto /tmp and /var/fossil
with the same results.

I have read some previous posts with some relevant information, but I don't
know what to do, here are the references:

http://www.mail-archive.com/fossil-users%40lists.fossil-scm.org/msg13410.html
http://www.mail-archive.com/fossil-users%40lists.fossil-scm.org/msg12224.html
http://www.mail-archive.com/fossil-users%40lists.fossil-scm.org/msg09440.html

To aggravate the problem, I have the same(?) turnkey linux version on AWS
(Amazon) and fossil 1.28 works flawlessly

?: Have to check, I guess is ubuntu based
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server responds Not Found [1.28]

2014-05-22 Thread Joe Prostko
On Fri, May 23, 2014 at 1:00 AM, pablo pa...@thy.oib.com wrote:
 Hi to all,

 What I have to do for FOSSIL SERVER to work on my server?

 I have installed a linux server on a VmWare Workstation and using the 1.28
 version of fossil.
 When I try to browse the repository i get a message of Not Found no matter
 what path I try to access (/index , /timeline)

My guess is it is because you are running Fossil as root.  This was
fixed somewhat recently, here:

http://fossil-scm.org/index.html/info/5e47d555e4770445328a34f8a46f6487b75192f6

Are you running as root on your other TKL installation?  If you can
build from source, maybe try a trunk build.  If not, I think you'll
have to wait for 1.29 to come out, which I suspect will be really
soon.

- joe
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Fossil server load control

2014-03-12 Thread Richard Hipp
A new feature was recently added to Fossil that allows it to deny expensive
requests (such as blame or tarball on a large repository) if the server
load average is too high.  See
http://www.fossil-scm.org/fossil/doc/tip/www/server.wiki#loadmgmt for
further information.

This new feature was recently added to the server that self-hosts Fossil
and which also hosts a number of other projects including SQLite and
System.Data.SQLite.

I am pleased to announce that this new feature has passed its first test.

About three hours ago, a single user in Beijing began downloading multiple
copies of the same System.Data.SQLite tarball.  As of this writing, he has
so far attempted to download that one tarball 11,784 times (at last count -
the download attempts are continuing...)  Download requests are arriving at
a rate of about one per second, and each request takes about 3.1 seconds of
CPU time in order to compute the 80MB tarball.  Since requests are arriving
faster than they can be serviced, this would formerly have resulted in
unlimited growth of the run-queue, essentially shutting down the server.
The effect is the same as having been slashdotted.  But thanks to the
recent enhancements, most of these massive download requests are rejected
with a 503 error and the server load average is staying below 4.0 at all
times and thus continues to provide quick responses to other 10
requests/second that the server normally receives.

If you are running your own publicly accessible Fossil server, you might
want to consider updating to the latest Fossil trunk and activating the
load-average limiter too.  (Note to Tclers:  I have already done this on
core.tcl.tk.)

And if you have alternative suggestions about how to keep a light-weight
host running smoothly under a massive Fossil request load, please post
follow-up comments.
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server load control

2014-03-12 Thread Andreas Kupries
On Wed, Mar 12, 2014 at 6:40 AM, Richard Hipp d...@sqlite.org wrote:
 A new feature was recently added to Fossil that allows it to deny expensive
 requests (such as blame or tarball on a large repository) if the server
 load average is too high.  See
 http://www.fossil-scm.org/fossil/doc/tip/www/server.wiki#loadmgmt for
 further information.

Interesting.

 I am pleased to announce that this new feature has passed its first test.

 About three hours ago, a single user in Beijing began downloading multiple
 copies of the same System.Data.SQLite tarball.  As of this writing, he has
 so far attempted to download that one tarball 11,784 times (at last count -

 a rate of about one per second, and each request takes about 3.1 seconds of
 CPU time in order to compute the 80MB tarball.

 And if you have alternative suggestions about how to keep a light-weight
 host running smoothly under a massive Fossil request load, please post
 follow-up comments.

How sensible do you think would it be to have a (limited-size)
(in-memory|disk) cache to hold the most recently requested tarballs ?
That way a high-demand tarball, etc. would be computed only once and
then served statically from the cache.

Note that I actually see this as a possible complement to the load mgmt feature.
The cache would help if demand is high for a small number of
revisions, whereas load mgmt would kick in and restrict load if the
access pattern of revisions is sufficiently random/spread out to
negate the cache (i.e. cause it to thrash).

Side note: While the same benefits could be had by putting a regular
web cache in front of the fossil server, i.e. a squid or the like this
would require more work to set up and admin. And might be a problem
for the truly dynamic parts of the fossil web ui. An integrated cache
just for the assets which are expensive to compute and yet
(essentially) static does not have these issues.

I mentioned in-memory and disk ... I can see that a two-level scheme
here ... A smaller in-memory cache for the really high-demand pieces
with LRU, and a larger disk cache for the things not so much in-demand
at the moment, but possibly in the future. The disk cache could
actually be much larger (disks are large and cheap these days), this
would help with random access attacks (as they would become
asymptotically more difficult as the disk cache over time extends its
net of quickly served assets).



-- 
Andreas Kupries
Senior Tcl Developer
Code to Cloud: Smarter, Safer, Faster(tm)
F: 778.786.1133
andre...@activestate.com
http://www.activestate.com
Learn about Stackato for Private PaaS: http://www.activestate.com/stackato

EuroTcl'2014, July 12-13, Munich, GER
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server load control

2014-03-12 Thread Richard Hipp
On Wed, Mar 12, 2014 at 1:13 PM, Andreas Kupries
andre...@activestate.comwrote:

 On Wed, Mar 12, 2014 at 6:40 AM, Richard Hipp d...@sqlite.org wrote:

  And if you have alternative suggestions about how to keep a light-weight
  host running smoothly under a massive Fossil request load, please post
  follow-up comments.

 How sensible do you think would it be to have a (limited-size)
 (in-memory|disk) cache to hold the most recently requested tarballs ?
 That way a high-demand tarball, etc. would be computed only once and
 then served statically from the cache.


It's on my to-do list, actually.  The idea is to have a separate database
that holds the cache.  And yes it is complementary to the load management
feature.



 Side note: While the same benefits could be had by putting a regular
 web cache in front of the fossil server, 


No they can't actually, at least not by any technology I'm aware of.  The
problem is that these request must be authenticated.  Downloads might be
only authorized for certain users.  If an authorized user does a download,
and squid caches it, some other unauthorized user might be able to obtain
the download from cache.

Even if downloads are currently authorized for anybody (which is the common
case, at least on public repos), I don't think you want them being cached,
since to do so would mean that turning off public downloads would be
ineffective until the caches all expired.

I mentioned in-memory and disk ... I can see that a two-level scheme
 here ... A smaller in-memory cache for the really high-demand pieces
 with LRU, and a larger disk cache for the things not so much in-demand
 at the moment, but possibly in the future. The disk cache could
 actually be much larger (disks are large and cheap these days), this
 would help with random access attacks (as they would become
 asymptotically more difficult as the disk cache over time extends its
 net of quickly served assets).


The current Fossil implementation runs a separate process for each HTTP
request.  So an in-memory cache wouldn't be helpful.  It has to be
disk-based.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server load control

2014-03-12 Thread Stephan Beal
On Wed, Mar 12, 2014 at 6:13 PM, Andreas Kupries
andre...@activestate.comwrote:

 How sensible do you think would it be to have a (limited-size)
 (in-memory|disk) cache to hold the most recently requested tarballs ?
 That way a high-demand tarball, etc. would be computed only once and
 then served statically from the cache.


FWIW: i was scratching down ideas for this very idea today for the
libfossil CGI demos because i don't like the memory cost of generate ZIP
files from script code. Caching the (say) 10 most recent ZIPs could
alleviate some of my load concerns. It need not be a synchable table, nor
in one which survives a rebuild.

Note that I actually see this as a possible complement to the load mgmt
 feature.
 The cache would help if demand is high for a small number of
 revisions, whereas load mgmt would kick in and restrict load if the
 access pattern of revisions is sufficiently random/spread out to
 negate the cache (i.e. cause it to thrash).


+1


 would require more work to set up and admin. And might be a problem
 for the truly dynamic parts of the fossil web ui. An integrated cache
 just for the assets which are expensive to compute and yet
 (essentially) static does not have these issues.


In my experience, most proxies won't cache for requests which have URL
parameters. Whether or not that's generally true, i can't say. For static
content (lots of what fossil serves is static), the URLs can/should be
written as /path/arg1/arg2, rather than /path?arg1=...arg2=..., to make
them potentially more cacheable.


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do. -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server load control

2014-03-12 Thread Ramon Ribó
 ​
The current Fossil implementation runs a separate process for each HTTP
 request.  So an in-memory cache wouldn't be helpful.  It has to be disk-
 based.

​Does not FastCGI do exactly the opposite?​

​RR​


2014-03-12 18:25 GMT+01:00 Richard Hipp d...@sqlite.org:




 On Wed, Mar 12, 2014 at 1:13 PM, Andreas Kupries andre...@activestate.com
  wrote:

 On Wed, Mar 12, 2014 at 6:40 AM, Richard Hipp d...@sqlite.org wrote:

  And if you have alternative suggestions about how to keep a light-weight
  host running smoothly under a massive Fossil request load, please post
  follow-up comments.

 How sensible do you think would it be to have a (limited-size)
 (in-memory|disk) cache to hold the most recently requested tarballs ?
 That way a high-demand tarball, etc. would be computed only once and
 then served statically from the cache.


 It's on my to-do list, actually.  The idea is to have a separate database
 that holds the cache.  And yes it is complementary to the load management
 feature.



 Side note: While the same benefits could be had by putting a regular
 web cache in front of the fossil server, 


 No they can't actually, at least not by any technology I'm aware of.  The
 problem is that these request must be authenticated.  Downloads might be
 only authorized for certain users.  If an authorized user does a download,
 and squid caches it, some other unauthorized user might be able to obtain
 the download from cache.

 Even if downloads are currently authorized for anybody (which is the
 common case, at least on public repos), I don't think you want them being
 cached, since to do so would mean that turning off public downloads would
 be ineffective until the caches all expired.

 I mentioned in-memory and disk ... I can see that a two-level scheme
 here ... A smaller in-memory cache for the really high-demand pieces
 with LRU, and a larger disk cache for the things not so much in-demand
 at the moment, but possibly in the future. The disk cache could
 actually be much larger (disks are large and cheap these days), this
 would help with random access attacks (as they would become
 asymptotically more difficult as the disk cache over time extends its
 net of quickly served assets).


 ​​
 The current Fossil implementation runs a separate process for each HTTP
 request.  So an in-memory cache wouldn't be helpful.  It has to be
 disk-based.

 --
 D. Richard Hipp
 d...@sqlite.org

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server load control

2014-03-12 Thread Richard Hipp
On Wed, Mar 12, 2014 at 1:26 PM, Stephan Beal sgb...@googlemail.com wrote:


 In my experience, most proxies won't cache for requests which have URL
 parameters. Whether or not that's generally true, i can't say. For static
 content (lots of what fossil serves is static), the URLs can/should be
 written as /path/arg1/arg2, rather than /path?arg1=...arg2=..., to make
 them potentially more cacheable.


With a few carefully chosen exceptions, Fossil always sets Cache-control:
no-cache in the header of its replies, due in large part to those pesky
authentication cookies.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil server load control

2014-03-12 Thread Stephan Beal
On Wed, Mar 12, 2014 at 6:31 PM, Ramon Ribó ram...@compassis.com wrote:


  
 The current Fossil implementation runs a separate process for each HTTP
  request.  So an in-memory cache wouldn't be helpful.  It has to be disk-
  based.

 Does not FastCGI do exactly the opposite?


FastCGI requires that there be some sort of state object which is can
re-set between calls, and feed that state into each child. Fossil doesn't
have such a state object (it has one, but not one which can simply be
re-set/re-used), so FastCGI can't really do its magic with fossil.
libfossil (currently under construction and moving along nicely) provides
such a construct.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do. -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] fossil server commit and other hooks?

2014-01-04 Thread Srikumar K. S.
Hi,

I'd like to know how to setup commit hooks on a fossil server
so that, for example, I can perform an automatic checkout,
run tests and restart a server. I intend to use this for
deploying projects on a server - sort of like heroku's
deploy using git push.

This has come up a few times in the past iirc, but I'm not
sure whether there is any resolution on whether fossil will
ever accept to support this and if so in what form it might 
take.

I'd like to propose something that (afaik) has not been
proposed --

Expose fossil server activity in the form of hook URLs
to which information about the activity is sent by POST
with the body in JSON format. With this setup, it would
be possible to code up a hook client in, say, node.js
which can respond appropriately.

So, for example, if trunk just got a new commit, and
a hook URL root of http://localhost:/myserver/;
is registered, then a POST to http://localhost:/myserver/commit;
is made with the body something like -

{branch:trunk, commit:longhexSHAid, comment:some text, ...}

Multiple such root URLs may be registered. In case connection
to one fails, it can be simply ignored.

I think there would be no need for the fossil server
to wait for the post action to complete before continuing
with whatever it needs to do (though I admit I haven't thought
that through).

Thoughts?
-Kumar




signature.asc
Description: Message signed with OpenPGP using GPGMail
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server commit and other hooks?

2014-01-04 Thread David Given
On 04/01/14 18:52, Srikumar K. S. wrote:
[...]
 This has come up a few times in the past iirc, but I'm not
 sure whether there is any resolution on whether fossil will
 ever accept to support this and if so in what form it might 
 take.

I believe that currently most people do this the other way round, by
using the RSS feed functionality. Your build server periodically polls
the feed for a particular branch, and whenever it sees a new checkin, it
schedules a new checkout and build.

Using a pull approach rather than a push approach simplifies things
considerably as the only server/server interaction is initiated from the
test framework, which has to have it anyway. Not having Fossil have to
know anything about the test framework is a big win.

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│ There does not now, nor will there ever, exist a programming
│ language in which it is the least bit hard to write bad programs. ---
│ Flon's Axiom



signature.asc
Description: OpenPGP digital signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server commit and other hooks?

2014-01-04 Thread Jan Nijtmans
2014/1/4 Srikumar K. S. srikuma...@gmail.com:
 I'd like to propose something that (afaik) has not been
 proposed --

 Expose fossil server activity in the form of hook URLs
 to which information about the activity is sent by POST
 with the body in JSON format. With this setup, it would
 be possible to code up a hook client in, say, node.js
 which can respond appropriately.

Yes, something like this has been proposed, and is
currently implemented in trunk. It takes the form
of a new commit TH1 hook( Admin - Xfer), which
can do http requests. The only information available
in the hook GET/POST is the uuid, from that the
server can derive anything else it needs to
know by accessing the fossil repository.

Other people already used this successfully, so
feel free to try it and post your feedback here.

Thanks!

Regards,
   Jan Nijtmans
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server commit and other hooks?

2014-01-04 Thread Richard Hipp
On Sat, Jan 4, 2014 at 1:52 PM, Srikumar K. S. srikuma...@gmail.com wrote:


 This has come up a few times in the past iirc, but I'm not
 sure whether there is any resolution on whether fossil will
 ever accept to support this and if so in what form it might
 take.


The difficulty here is that the server does not know when it has received a
push of a check-in.

A single check-in consists of one or more artifacts.  There is always at
least a manifest artifact.  And there are usually additional artifacts
containing the text of files that have changed.

The repository is just a bag of artifacts.  Some artifacts are unique to a
particular check-in.  Some artifacts are shared between multiple
check-ins.  Other artifacts contain wiki pages or changes to trouble
tickets, etc.

When a sync or push or pull occurs, the two endpoints merely exchange
artifacts.  The sync operation does not know what those artifacts represent
however.  So the sync logic does not know if it has received a wiki page
change, or a complete check-in, or 5 different check-ins, or just part of a
single check-in.  The sync logic just knows that it got a few artifacts.

Because the sync logic does not know the meaning of the artifacts it has
received, it has no way of triggering some action when a check-in is
received.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server commit and other hooks?

2014-01-04 Thread Jan Nijtmans
2014/1/4 Richard Hipp d...@sqlite.org:
 Because the sync logic does not know the meaning of the artifacts it has
 received, it has no way of triggering some action when a check-in is
 received.
The sync logic itself indeed doesn't know the meaning of the
artifacts, but every artifact which is received is parsed in order
to be able to update the various tables. After this parsing,
the needed information is available, this is used to
trigger the Transfer Commit Script if it was a commit
or the Transfer Ticket Script if it was a ticket change.

Regards,
 Jan Nijtmans
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server commit and other hooks?

2014-01-04 Thread Richard Hipp
On Sat, Jan 4, 2014 at 5:24 PM, Jan Nijtmans jan.nijtm...@gmail.com wrote:

 2014/1/4 Richard Hipp d...@sqlite.org:
  Because the sync logic does not know the meaning of the artifacts it has
  received, it has no way of triggering some action when a check-in is
  received.
 The sync logic itself indeed doesn't know the meaning of the
 artifacts, but every artifact which is received is parsed in order
 to be able to update the various tables. After this parsing,
 the needed information is available, this is used to
 trigger the Transfer Commit Script if it was a commit
 or the Transfer Ticket Script if it was a ticket change.


Receiving a manifest does not mean that you have received the entire
check-in.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server commit and other hooks?

2014-01-04 Thread Jan Nijtmans
2014/1/4 Richard Hipp d...@sqlite.org:
 Receiving a manifest does not mean that you have received the entire
 check-in.

True. The file content might not be available yet, but the commit
comment message and the file list is. The server
might need some delay and/or retry. But it should be
usable enough.

Regards,
   Jan Nijtmans
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] 'fossil server' fails to chroot

2013-01-08 Thread Michai Ramakers
Hello,

I saw this was fixed right after my mail (checkin [baa1ebb7d9]) -
verified it, works fine.

Thank you once again for the very quick response!

keep up the good work,
Michai

On Mon, Jan 7, 2013 at 3:58 PM, Michai Ramakers m.ramak...@gmail.com wrote:
 Hello,

 when I open ('fossil open') a repository located in the root ('/'),
 where the current work dir is one below the root (say, '/mydir'),
 'fossil server' results in an error message in my browser, when I view
 'http://localhost:8080':

Status: 200 OK
   X-Frame-Options: SAMEORIGIN
   Cache-control: no-cache
   Content-Type: text/html; charset=utf-8
   Content-Length: 50

   p class=generalErrorunable to chroot into /p

 (I literally see this text in the browser window).

 Environment:

   $ fossil version
   This is fossil version 1.25 [48798b2719] 2013-01-07 15:03:43 UTC
   $ uname -a
   NetBSD lime 6.0.1 NetBSD 6.0.1 (GENERIC) amd64

 I tried with both static ('./configure --static  make') and dynamic
 binaries; both fail.

 Dynamic binary works ok if I open the repository one dir further from
 the root (i.e. '/foo/bar' instead of '/foo'), while repository is
 still located in the root. (I didn't try with static binary anymore.)

 Not urgent, but ran into this by accident.

 With kind regards,
 Michai Ramakers
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] 'fossil server' fails to chroot

2013-01-07 Thread Michai Ramakers
Hello,

when I open ('fossil open') a repository located in the root ('/'),
where the current work dir is one below the root (say, '/mydir'),
'fossil server' results in an error message in my browser, when I view
'http://localhost:8080':

   Status: 200 OK
  X-Frame-Options: SAMEORIGIN
  Cache-control: no-cache
  Content-Type: text/html; charset=utf-8
  Content-Length: 50

  p class=generalErrorunable to chroot into /p

(I literally see this text in the browser window).

Environment:

  $ fossil version
  This is fossil version 1.25 [48798b2719] 2013-01-07 15:03:43 UTC
  $ uname -a
  NetBSD lime 6.0.1 NetBSD 6.0.1 (GENERIC) amd64

I tried with both static ('./configure --static  make') and dynamic
binaries; both fail.

Dynamic binary works ok if I open the repository one dir further from
the root (i.e. '/foo/bar' instead of '/foo'), while repository is
still located in the root. (I didn't try with static binary anymore.)

Not urgent, but ran into this by accident.

With kind regards,
Michai Ramakers
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server --baseurl doesn't work with directories

2012-12-10 Thread Gautier DI FOLCO
2012/12/6 Richard Hipp d...@sqlite.org

 I have your requests (both this on and FOSSIL_USERS).  I'm a little busy
 now fixing problems on other systems.  Remind me if I fail to get back to
 this within a few days.


 On Thu, Dec 6, 2012 at 1:15 PM, Maxim Khitrov m...@mxcrypt.com wrote:

 On Thu, Dec 6, 2012 at 7:56 AM, Maxim Khitrov m...@mxcrypt.com wrote:
  Found a way around the problem with the following nginx configuration:
 
  location / {
  proxy_pass http://localhost:8080/;
  proxy_redirect http:// https://;
 
  proxy_set_header Host $host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 
  sub_filter http://server_name https://server_name;
  }
 
  Replace server_name in the sub_filter line, the variable
  $server_name doesn't seem to be working. This trick requires you to
  have the ngx_http_sub_module compiled:
 
  http://nginx.org/en/docs/http/ngx_http_sub_module.html
 
  A cleaner solution would be better, but I guess this will do for now.
 
  - Max

 Ignore all of this, simply using proxy_set_header HTTPS on; is the
 clean solution that I was looking for. While I was digging through the
 cgi.c source, I also made a 2-line modification that allows for proper
 handling of the X-Real-IP header. Would it be possible to get this
 patch into the main tree?

 - Max

 --- src/cgi.c.orig  2012-12-06 13:07:39.0 -0500
 +++ src/cgi.c   2012-12-06 13:07:44.0 -0500
 @@ -1212,6 +1212,8 @@
  #endif
  }else if( fossil_strcmp(zFieldName,user-agent:)==0 ){
cgi_setenv(HTTP_USER_AGENT, zVal);
 +}else if( fossil_strcmp(zFieldName,x-real-ip:)==0 ){
 +  cgi_replace_parameter(REMOTE_ADDR, mprintf(%s,zVal));
  }
}



I had the same issue, an ugly way to do this is to remove $home or
replace it by $baseurl in src/style.c and src/skin.c.

Then put it in nginx configuration:
  location ~ ^/fossil/([^\/]*)(.*)$ {
proxy_pass http://127.0.0.1:8080/$1$2;
proxy_redirect off;

proxy_set_header   Host $host/fossil;
proxy_set_header   X-Real-IP   $remote_addr;
proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header   SCRIPT_NAME /$1;
  }
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server --baseurl doesn't work with directories

2012-12-06 Thread Maxim Khitrov
On Wed, Dec 5, 2012 at 9:56 PM, Maxim Khitrov m...@mxcrypt.com wrote:
 Hello,

 I have fossil running behind nginx, which is proxying https
 connections to http://localhost:8080/. If I start the server with
 fossil server /my/repo/dir/ to make all *.fossil repositories
 available, fossil generates wrong links by using the http scheme
 instead of https. However, if I specify the --baseurl https://.../;
 option, urls such as https://.../repo/index; are redirected to
 https://.../index;, which obviously doesn't exist.

 Is there a way to force fossil to use https in URLs and redirects even
 through the request from nginx comes in on http? A permanent fix might
 be to look at the X-Forwarded-Proto header.

 - Max

Found a way around the problem with the following nginx configuration:

location / {
proxy_pass http://localhost:8080/;
proxy_redirect http:// https://;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

sub_filter http://server_name https://server_name;
}

Replace server_name in the sub_filter line, the variable
$server_name doesn't seem to be working. This trick requires you to
have the ngx_http_sub_module compiled:

http://nginx.org/en/docs/http/ngx_http_sub_module.html

A cleaner solution would be better, but I guess this will do for now.

- Max
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server --baseurl doesn't work with directories

2012-12-06 Thread Maxim Khitrov
On Thu, Dec 6, 2012 at 7:56 AM, Maxim Khitrov m...@mxcrypt.com wrote:
 Found a way around the problem with the following nginx configuration:

 location / {
 proxy_pass http://localhost:8080/;
 proxy_redirect http:// https://;

 proxy_set_header Host $host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

 sub_filter http://server_name https://server_name;
 }

 Replace server_name in the sub_filter line, the variable
 $server_name doesn't seem to be working. This trick requires you to
 have the ngx_http_sub_module compiled:

 http://nginx.org/en/docs/http/ngx_http_sub_module.html

 A cleaner solution would be better, but I guess this will do for now.

 - Max

Ignore all of this, simply using proxy_set_header HTTPS on; is the
clean solution that I was looking for. While I was digging through the
cgi.c source, I also made a 2-line modification that allows for proper
handling of the X-Real-IP header. Would it be possible to get this
patch into the main tree?

- Max

--- src/cgi.c.orig  2012-12-06 13:07:39.0 -0500
+++ src/cgi.c   2012-12-06 13:07:44.0 -0500
@@ -1212,6 +1212,8 @@
 #endif
 }else if( fossil_strcmp(zFieldName,user-agent:)==0 ){
   cgi_setenv(HTTP_USER_AGENT, zVal);
+}else if( fossil_strcmp(zFieldName,x-real-ip:)==0 ){
+  cgi_replace_parameter(REMOTE_ADDR, mprintf(%s,zVal));
 }
   }
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil server --baseurl doesn't work with directories

2012-12-06 Thread Richard Hipp
I have your requests (both this on and FOSSIL_USERS).  I'm a little busy
now fixing problems on other systems.  Remind me if I fail to get back to
this within a few days.

On Thu, Dec 6, 2012 at 1:15 PM, Maxim Khitrov m...@mxcrypt.com wrote:

 On Thu, Dec 6, 2012 at 7:56 AM, Maxim Khitrov m...@mxcrypt.com wrote:
  Found a way around the problem with the following nginx configuration:
 
  location / {
  proxy_pass http://localhost:8080/;
  proxy_redirect http:// https://;
 
  proxy_set_header Host $host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 
  sub_filter http://server_name https://server_name;
  }
 
  Replace server_name in the sub_filter line, the variable
  $server_name doesn't seem to be working. This trick requires you to
  have the ngx_http_sub_module compiled:
 
  http://nginx.org/en/docs/http/ngx_http_sub_module.html
 
  A cleaner solution would be better, but I guess this will do for now.
 
  - Max

 Ignore all of this, simply using proxy_set_header HTTPS on; is the
 clean solution that I was looking for. While I was digging through the
 cgi.c source, I also made a 2-line modification that allows for proper
 handling of the X-Real-IP header. Would it be possible to get this
 patch into the main tree?

 - Max

 --- src/cgi.c.orig  2012-12-06 13:07:39.0 -0500
 +++ src/cgi.c   2012-12-06 13:07:44.0 -0500
 @@ -1212,6 +1212,8 @@
  #endif
  }else if( fossil_strcmp(zFieldName,user-agent:)==0 ){
cgi_setenv(HTTP_USER_AGENT, zVal);
 +}else if( fossil_strcmp(zFieldName,x-real-ip:)==0 ){
 +  cgi_replace_parameter(REMOTE_ADDR, mprintf(%s,zVal));
  }
}
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] fossil server --baseurl doesn't work with directories

2012-12-05 Thread Maxim Khitrov
Hello,

I have fossil running behind nginx, which is proxying https
connections to http://localhost:8080/. If I start the server with
fossil server /my/repo/dir/ to make all *.fossil repositories
available, fossil generates wrong links by using the http scheme
instead of https. However, if I specify the --baseurl https://.../;
option, urls such as https://.../repo/index; are redirected to
https://.../index;, which obviously doesn't exist.

Is there a way to force fossil to use https in URLs and redirects even
through the request from nginx comes in on http? A permanent fix might
be to look at the X-Forwarded-Proto header.

- Max
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Fossil Server: which repositories are being served?

2011-10-17 Thread David Bovill
As far as I know - there is no way for someone to find out the names of the
fossil repositories being served by a server. Actually I am not sure how to
do this even if you have fossil installed... on my public server I have a
cgi script that return a list of fossil files in the directory being served,
which works OK - is there a better way?

What would be generally useful I think, is if fossil would serve wiki page /
site for the root of the server - at the moment a user just gets Not
Found. This default fossil page would offer the option of navigation to the
various fossil sites being served.

On a LAN it is great to serve up all the repositories without the hassle of
setting up an Apache server and cgi's - it would be great if we could
announce which repositories were available using the built in fossil server.

Suggestion:  if Fossil made available (ie via a TH1 variable) the list of
local fossil repositories being served, then we could have a central
navigation page which would be updated when new repositories were installed
/ deleted. This would also enable fossil skins to offer navigation to other
fossil sites on the same server.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users