Search Results

Search found 12107 results on 485 pages for 'session timeout'.

Page 14/485 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Django site on Nginx+FastCGI goes (504 gateway timeout)

    - by jack
    Sometimes my whole Django based site goes into 504 gateway timeout errors so none page can be displayed. Is it possible to write a shell program and cronjob it run every 5 minutes to detect such errors and restart FastCGI process if needed? I'm currently using command below to restart FastCGI in case it's crashed but it doesn't work for above situation because when 504 gateway errors occur, the processes are still running. ps ax | grep -v grep | grep port=8001 > /dev/null || restart_fcgi.sh

    Read the article

  • Bash: Terminate on Timeout/File Overflow while Executing Command

    - by Chris
    I'm writing a mock-grading script in bash. It's supposed to execute a C program which will give some output (which I redirect to a file.) I'm trying to (1) make it timeout after a certain duration and also (2) terminate if the output file reaches a certain file size limit. Not sure how to go about either of these. Any help? Thanks.

    Read the article

  • Specify connection timeout in java.nio

    - by miorel
    Using non-blocking I/O, the code for connecting to a remote address looks something like: SocketChannel channel = SelectorProvider.provider().openSocketChannel(); channel.configureBlocking(false); channel.connect(address); The connection process will then have to be finished by invoking finishConnect() on the channel when some selector says the corresponding key isConnectable(). Is there a way to specify the connection timeout when using this idiom?

    Read the article

  • Possible uncommitted transactions causing "System.Data.SqlClient.SqlException: Timeout expired" erro

    - by Michael
    My application requires a user to log in and allows them to edit a list of things. However, it seems that if the same user always logs in and out and edits the list, this user will run into a "System.Data.SqlClient.SqlException: Timeout expired." error. I've read comments about increasing the timeout period but I've also read a comment about it possibly caused by uncommitted transactions. And I do have one going in the application. I'll provide the code I'm working with and there is an IF statement in there that I was a little iffy about but it seemed like a reasonable thing to do. I'll just go over what's going on here, there is a list of objects to update or add into the database. New objects created in the application are given an ID of 0 while existing objects have their own ID's generated from the DB. If the user chooses to delete some objects, their IDs are stored in a separate list of Integers. Once the user is ready to save their changes, the two lists are passed into this method. By use of the IF statement, objects with ID of 0 are added (using the Add stored procedure) and those objects with non-zero IDs are updated (using the Update stored procedure). After all this, a FOR loop goes through all the integers in the "removal" list and uses the Delete stored procedure to remove them. A transaction is used for all this. Public Shared Sub UpdateSomethings(ByVal SomethingList As List(Of Something), ByVal RemovalList As List(Of Integer)) Using DBConnection As New SqlConnection(conn) DBConnection.Open() Dim MyTransaction As SqlTransaction MyTransaction = DBConnection.BeginTransaction() Try For Each SomethingItem As Something In SomethingList Using MyCommand As New SqlCommand() MyCommand.Connection = DBConnection If SomethingItem.ID > 0 Then MyCommand.CommandText = "UpdateSomething" Else MyCommand.CommandText = "AddSomething" End If MyCommand.Transaction = MyTransaction MyCommand.CommandType = CommandType.StoredProcedure With MyCommand.Parameters If MyCommand.CommandText = "UpdateSomething" Then .Add("@id", SqlDbType.Int).Value = SomethingItem.ID End If .Add("@stuff", SqlDbType.Varchar).Value = SomethingItem.Stuff End With MyCommand.ExecuteNonQuery() End Using Next For Each ID As Integer In RemovalList Using MyCommand As New SqlCommand("DeleteSomething", DBConnection) MyCommand.Transaction = MyTransaction MyCommand.CommandType = CommandType.StoredProcedure With MyCommand.Parameters .Add("@id", SqlDbType.Int).Value = ID End With MyCommand.ExecuteNonQuery() End Using Next MyTransaction.Commit() Catch ex As Exception MyTransaction.Rollback() 'Exception handling goes here End Try End Using End Sub There are three stored procedures used here as well as some looping so I can see how something can be holding everything up if the list is large enough. Other users can log in to the system at the same time just fine though. I'm using Visual Studio 2008 to debug and am using SQL Server 2000 for the DB.

    Read the article

  • Java socket close timeout

    - by Shayan
    In java when you close a socket it doesn't do anything anymore but it actually closes the tcp connection after a timeout time. I need thousands of sockets and I want them to be closed exactly after closed them not after wasting my time and my resources! What can I do? Thank you.

    Read the article

  • Keyboard input with timeout in Python

    - by J. Pablo Fernández
    How would you prompt the user for some input but timing out after N seconds? Google is pointing to a mail thread about it at http://mail.python.org/pipermail/python-list/2006-January/533215.html but it seems not to work. The statement in which the timeout happens, no matter whether it is a sys.input.readline or timer.sleep(), I always get: <type 'exceptions.TypeError'>: [raw_]input expected at most 1 arguments, got 2 which somehow the except fails to catch.

    Read the article

  • set timeout to http response read method in python

    - by nirtayeb
    Hi, I'm building a download manager in python for fun, and sometimes the connection to the server is still on but the server doesn't send me data, so read method (of HTTPResponse) block me forever. This happens, for example, when I download from a server, which located outside of my country, that limit the bandwidth to other countries. How can I set a timeout for the read method (2 minutes for example)? Thanks, Nir.

    Read the article

  • Django site runs into "504 timeout error"

    - by jack
    I have a Django based site on Nginx+FastCGI which keeps running into "504 timeout error" after about 30 minutes since FastCGI process restarted. I did a "ps -aux" check and a lot of FastCGI processes are with D status. How can I figure out which part of the site make FastCGI processes not responsing?

    Read the article

  • Spring Framework 3 and session attributes

    - by newbie
    I have form object that I set to request in GET request handler in my Spring controller. First time user enters to page, a new form object should be made and set to request. If user sends form, then form object is populated from request and now form object has all user givern attributes. Then form is validated and if validation is ok, then form is saved to database. If form is not validated, I want to save form object to session and then redirect to GET request handling page. When request is redirected to GET handler, then it should check if session contains form object. I have figured out that there is @SessionAttributes("form") annotation in Spring, but for some reason following doesnt work, because at first time, session attribute form is null and it gives error: org.springframework.web.HttpSessionRequiredException: Session attribute 'form' required - not found in session Here is my controller: @RequestMapping(value="form", method=RequestMethod.GET) public ModelAndView viewForm(@ModelAttribute("form") Form form) { ModelAndView mav = new ModelAndView("form"); if(form == null) form = new Form(); mav.addObject("form", form); return mav; } @RequestMapping(value="form", method=RequestMethod.POST) @Transactional(readOnly = true) public ModelAndView saveForm(@ModelAttribute("form") Form form) { FormUtils.populate(form, request); if(form.validate()) { formDao.save(); } else { return viewForm(form); } return null; }

    Read the article

  • Using AppFabric session state provider, does each session get its own region?

    - by goombaloon
    I've been playing around with AppFabric Beta 2's session state provider. It appears that each new session get its own region (named "Default_Region_XXXX" (where XXXX is an apparent random sequence of numbers). If I understand regions correctly, it appears that each region is tied to a single cluster host, leaving a single point of failure. Why is each session being given it own region? Also, do sessions eventually timeout and clean themselves up in the cache or is that behavior just inherited from the cache settings? I'm wondering (if in a production application scenario), if one would use a separate named cache for session state apart from other application caches? Thanks.

    Read the article

  • asp.net mvc enabling session state

    - by Erwin
    Hi fellow programmer I'd like to use session variables in my ASP.NET MVC application. I already added tag in my web.config file like this <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:2967" sqlConnectionString="data source=127.0.0.1;trusted_connection=true" cookieless="false" timeout="20" /> But I still can't use session variables in my application I set the var like this in my login method Session["username"] = userName; and retrieve it like this ba.user_id = (string)Session["username"]; I got null string when retrieving.

    Read the article

  • Uploadify (Session and authentication) with ASP.NET MVC

    - by Dragouf
    When I use Authorize filter on an action or a controller used by uplodify (http://www.uploadify.com/) the action isn't reach... moreover Session are not retrieved. I found this to retrieved user session : http://geekswithblogs.net/apopovsky/archive/2009/05/06/working-around-flash-cookie-bug-in-asp.net-mvc.aspx But how to use it with [Authorize] filter and retrieved session ?

    Read the article

  • NHibernate, Databinding to DataGridView, Lazy Loading, and Session managment - need advice

    - by Tom Bushell
    My main application form (WinForms) has a DataGridView, that uses DataBinding and Fluent NHibernate to display data from a SQLite database. This form is open for the entire time the application is running. For performance reasons, I set the convention DefaultLazy.Always() for all DB access. So far, the only way I've found to make this work is to keep a Session (let's call it MainSession) open all the time for the main form, so NHibernate can lazy load new data as the user navigates with the grid. Another part of the application can run in the background, and Save to the DB. Currently, (after considerable struggle), my approach is to call MainSession.Disconnect(), create a disposable Session for each Save, and MainSession.Reconnect() after finishing the Save. Otherwise SQLite will throw "The database file is locked" exceptions. This seems to be working well so far, but past experience has made me nervous about keeping a session open for a long time (I ran into performance problems when I tried to use a single session for both Saves and Loads - the cache filled up, and bogged down everything - see http://stackoverflow.com/questions/2526675/commit-is-very-slow-in-my-nhibernate-sqlite-project). So, my question - is this a good approach, or am I looking at problems down the road? If it's a bad approach, what are the alternatives? I've considered opening and closing my main session whenever the user navigates with the grid, but it's not obvious to me how I would do that - hook every event from the grid that could possibly cause a lazy load? I have the nagging feeling that trying to manage my own sessions this way is fundamentally the wrong approach, but it's not obvious what the right one is.

    Read the article

  • Session Id in url and/or cookie? [closed]

    - by Jacco
    Most people advice against rewriting every (internal) url to include the sessionId (both GET and POST). The standard argument against it seems to be:   If an attacker gets hold of the sessionId, they can hijack the session.   With the sessionId in the url, it easily leaks to the attacker (by referer etc.) But what if you put the sessionId in both an (encrypted) cookie and the url. if the sessionId in either the cookie or the url is missing or if they do not match, decline the request. Let's pretend the website in question is free of xss holes, the cookie encryption is strong enough, etc. etc. Then what is the increased risk of rewriting every url to include the sessionId? UPDATE: @Casper That is a very good point. so up to now there are 2 reasons: bad for search engines / SEO if used in public part of the website can cause trouble when users post an url with a session Id on a forum, send it trough email or bookmark the page apart from the:   It increases the security risk, but it is not clear what the increased risk is. some background info: I've a website that offers blog-like service to travellers. I cannot be sure cookies work nor can I require cookies to work. Most computers in internet cafes are old and not (even close to) up-to-date. The user has no control over them and the connection can be very unreliable for some more 'off the beaten path' locations. Binding the session to an IP-address is not possible, some places use load-balancing proxies with multiple IP addresses. (and from China there is The Great Firewall). Upon receiving the first cookie back, I flag cookies as mandatory. However, if the cookie was flagged as mandatory but not there, I ask for their password once more, knowing their session from the url. (Also cookies have a 1 time token in them, but that's not the point of this question). UPDATE 2: The conclusion seems to be that there are no extra *security* issues when you expose you session id trough the URL while also keeping a copy of the session id in an encrypted cookie. Do not hesitate to add additional information about any possible security implications

    Read the article

  • What is the purpose of WCF reliable session?

    - by bsnote
    The documentation around this topic is poor. I use WCF services with NetTcpBinding hosted in Windows service. The problem is that a session is dropped when it is inactive for some time. What I need is the session which is always alive. Is WCF reliable session something that can help? Or I can just play with timeout settings?

    Read the article

  • Eclipse RAP - Firefox doesn't forget session

    - by Fritz H
    We've got an Eclipse RAP application that's behaving a bit strangely in Firefox - two distinct problems. When you browse around, you can click on a button in one part of the system. This opens a popup window like so: IWorkbenchBrowserSupport bs; bs = PlatformUI.getWorkbench().getBrowserSupport(); int style = IWorkbenchBrowserSupport.AS_EXTERNAL; IWebBrowser b = bs.createBrowser(style, getRandomID(), "Hello world", ""); b.openURL(new URL(...)); where the URL is another servlet in the application. This servlet is in the same runtime, but has nothing to do with RAP - it takes a binary blob from in-memory storage and dumps it in the output stream. Problem 1: This causes the HTTP session to die in firefox, and shows the "session expired" RAP error page with a link to restart the session. Problem 2: Now, when you click on the link to restart the session, it shows the application's dialog again, but the session expired error is shown again the moment you do anything. This prevents the user from using the system again, unless Firefox is closed down completely and restarted. A quick peek with FireBug reveals that the JSESSIONID passed by Firefox does not change. Has anyone seen this before?

    Read the article

  • Session state in asp.net mvc

    - by tiff
    I would like to know how to use session state in a simple log in log out in asp.net mvc.. I have a code here in my controller that I've retrieved from my mysql database for my session log in..but I don't really know how to manipulate it.. <AcceptVerbs(HttpVerbs.Post)> _ Function Index(ByVal username As String, ByVal password As String, ByVal department As String) As ActionResult Dim user As DataTable user = Account.userSelect(username:=username, password:=password, department:=department) If user.Rows.Count = 0 Then Return RedirectToAction("Index", "Home") Else Session("username") = user.Rows(0).Item("username") Session("department") = user.Rows(0).Item("department") Return RedirectToAction("News", "Administration") End If End Function Thank you!

    Read the article

  • ASP.NET Session State Error only on default document

    - by schmidty
    I have a site where when accessing via site.com/default.aspx everything is fine, however when accessing via site.com/ I get a session error as follows: "Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \\ section in the application configuration." I have confirmed that default.aspx is the highest priority default document and that it is the page being loaded. However why is this session error only occurring when accessing via the default document? The server is 2008 R2 and IIS 7.5.

    Read the article

  • Sharing session state between 2 ASP.NET applications using SQL Server

    - by Dave
    Hi I'm working on a site that has a requirement to share session between a cms application and an online store application on the same domain eg. mydomain.com and store.mydomain.com I've made some progress with it and it works on my local build between localhost/cms and localhost/store Basically I have done what is suggested in this article http://blogs.msdn.com/toddca/archive/2007/01/25/sharing-asp-net-session-state-across-applications.aspx and hacked the TempGetAppID Stored Procedure to return the same application id (1). This appears to work as it creates sessions with ids like 'abv5d2urx1asscfwuzw3wp4500000001', which is what I'd expect. My issue is that when I deploy it to our testing environment, it creates a new session when I navigate between the 2 sites. So when I start a session on the cms site, if I navigate to the store, it creates a new session. These are set up as 2 different websites in IIS7. In the web.config files for both sites, the and elements are both the same and are as follows (minus sensitive information) Has anyone got an ideas why this might not be working? I am sharing Forms Authentication across the 2 sites and that works fine. Any help or ideas would be greatly appreciated! Many thanks Dave

    Read the article

  • PHP Session variables not passing across pages

    - by mitch
    Common problem, but I'm stumped. Session variables are passing across pages on my local (localhost) deployment, but not on my (www) host. I use a common includes file for each page with this code: $sessionDomain = "/"; @ini_set("session.cookie_path",$sessionDomain); $sessionName = "ccSID".md5('/store/'); session_name($sessionName); session_start(); I confirmed that the session ID cookie (ccSIDxxxxx...) remains the same across pages in my browser, but session variables don't seem to hold up when changing to a page in a different directory.

    Read the article

  • CodeIgniter extend user's session expiration time

    - by spacemonkey
    Hi, Is it possible to extend user's session expiration time in CI. What I want to do is, by default every user's session cookie lasts for example 1 day, but every time user visits the site his session expiration time is extended by one more day. I don't know if it is a good idea to do this, maybe I should just set cookies life time for like a week and that's it? Thanks!

    Read the article

  • ASP.NET and Session State/Login info

    - by V-Man
    Are Session variables (in ASP.NET) the safest way to store data relating to whether a user is logged in or not? i.e. Session["LoggedIn"] = 'No' I know Session variables can be spoofed so I assume there must be a safer way. Any ideas for ASP.NET? Thanks!

    Read the article

  • How to work with session variables in php mvc pattern

    - by Richard
    Hello, I just found out that I loose any reference to the session array if I create a new view and try to set a session variable in the controller. The array just comes out as empty. I actually try to use the session array to store the post vars from a multistep registration form. This was actually working when the php was spachetticode, but now that I dumpt everything in a mvc pattern, it is not functioning anymore. Can anyone explain what is going om here and possibly offer a solution om how to work with the session array? Thanks in adv, Richard

    Read the article

  • How to work with session variables in php mvc pattern

    - by Richard
    Hello, I just found out that I loose any reference to the session array if I create a new view and try to set a session variable in the controller. The array just comes out as empty. I actually try to use the session array to store the post vars from a multistep registration form. This was actually working when the php was spachetticode, but now that I dumpt everything in a mvc pattern, it is not functioning anymore. Can anyone explain what is going om here and possibly offer a solution om how to work with the session array? Thanks in adv, Richard

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >